Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Header variable

Started by Constantinos Chinopoulos 8 years ago · 0 replies · 734 views
8 years ago

I created a blueprint file named 'project.yaml' with the following code:

title: Project
'@extends':
type: default
context: blueprints://pages

form:
fields:
tabs:
type: tabs
active: 1

YAML
  fields:
    content:
      fields:

        header.renovation_package:
          ordering@: 6
          style: vertical
          size: small
          type: select
          label: Πακέτο Ανακαίνισης
          description: <small style="color:#cccccc;"><i><strong>NOTE:</strong> Lorem ipsum</i></small>
          options:
                default: -
                superior: 'Superior'
                executive: 'Executive'
                deluxe: 'Deluxe'

...my proble is when i try to output the variables of the 'select' fields with twig i get the 'key' not the value!!!

Example, if i select the default option:

{{ header.renovation_package }}

...gives...

'default'

...not...

'-'

...how do i get the value instead of the key?

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by TomW, 3 days ago
3 86 3 days ago
Forms & Blueprints · by Japhy, 3 weeks ago
2 398 2 weeks ago
Forms & Blueprints · by FrViPofm, 1 month ago
5 398 1 month ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2392 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 850 9 months ago