Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

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

Started by Muut Archive 10 years ago · 3 replies · 432 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 2289 9 years ago
Archive · by Muut Archive, 9 years ago
2 1503 9 years ago
Archive · by Muut Archive, 9 years ago
2 4754 9 years ago
Archive · by Muut Archive, 9 years ago
1 3570 9 years ago
Archive · by Muut Archive, 9 years ago
3 1627 9 years ago