Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Page blueprint

Started by Muut Archive 10 years ago · 1 replies · 441 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 2600 9 years ago
Archive · by Muut Archive, 9 years ago
2 1710 9 years ago
Archive · by Muut Archive, 9 years ago
2 5003 9 years ago
Archive · by Muut Archive, 9 years ago
1 3835 9 years ago
Archive · by Muut Archive, 9 years ago
3 1817 9 years ago