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

Header variable

Started by Constantinos Chinopoulos 8 years ago · 0 replies · 680 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 Japhy, 15 hours ago
0 31 15 hours ago
Forms & Blueprints · by FrViPofm, 3 weeks ago
5 276 3 weeks ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2267 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 733 9 months ago
Forms & Blueprints · by Flachy Joe, 10 months ago
9 813 10 months ago