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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Header variable

Started by Constantinos Chinopoulos 7 years ago · 0 replies · 478 views
7 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 Ton Haarmans, 5 years ago
13 1135 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 134 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 108 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 128 7 months ago