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

Adding custom form data to the page

Started by Muut Archive 9 years ago · 1 replies · 379 views
9 years ago

I have created a from field in my admin area to have an additional piece of content for the page. What do I need to add to the page to grab this data and place it on the page? I am using the following sample code in my blueprint:

YAML
      fields:
        header.an_example_text_field:
          type: text
          label: Add a number
          default: 5
          validate:
            required: true
            type: int
9 years ago

just add in your template
{{ page.header.anexampletext_field }}
and it should output the content saved in the admin

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1346 9 years ago
Archive · by Muut Archive, 9 years ago
2 933 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago