Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Page blueprint

Started by Muut Archive 10 years ago · 1 replies · 358 views
10 years ago

Hi all. I have a problem with page blueprint page coding for admin panel.
I have the folowing code in product.yaml

YAML
                    header.category:
                      type: select
                      label: Category
                      help: 'Select the product category'
                      default: one
                      options:
                        one: Cart
                        two: Std Container
                        three: Oven Rack

When I choose in admin panel one of this option grav saves in product.md like "category: two". But how to fix it so that it will be like "category: Cart". Thanks before

10 years ago

As far as I know, it's a key value array, so you can replace it with your own label, eg:

YAML
  type: select
                      label: Category
                      help: 'Select the product category'
                      default: cart
                      options:
                        cart: Cart
                        container: Std Container
                        oven: Oven Rack

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1366 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago