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

Custom article field I can use and show on front-end?

Started by Muut Archive 10 years ago · 3 replies · 353 views
10 years ago

So right now in the admin panel, I can put title and content for the post. How can I add one more input field and use it for additional content (let it be a special note from the author)?

10 years ago

You can extend the default yaml and add your field.

YAML
title: Special
'@extends':
    type: default
    context: blueprints://pages

form:
  fields:
    tabs:
      type: tabs
      active: 1
      fields:
        content:
          fields:
              header.specialnote:
                type: textarea
                label: Special note from the author

This should append your field to the 'content' tab

10 years ago

@paulmassendari thanks! What is the "default" yaml file you have in mind?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1357 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2955 9 years ago
Archive · by Muut Archive, 9 years ago
3 1121 9 years ago