Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Header variable

Started by Constantinos Chinopoulos 8 years ago · 0 replies · 813 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 Anna, 2 days ago
2 53 16 hours ago
Forms & Blueprints · by Anna, 3 days ago
7 82 16 hours ago
Forms & Blueprints · by Anna, 1 week ago
5 186 6 days ago
Forms & Blueprints · by TomW, 1 month ago
3 379 1 month ago
Forms & Blueprints · by Japhy, 2 months ago
2 595 2 months ago