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

How can I put fields above the original Content

admin

Started by Chris Jung 9 years ago · 3 replies · 742 views
9 years ago

I'd like to extend the content page of grav pages, adding two fields above the title and content fields. Adding under all fields works without problems.

edit: Im talking about the fields in grav admin, if that was unclear. It's not about the theme / templates ;-)

last edited 10/22/17 by Chris Jung
9 years ago

You can use the ordering attribute, example:

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

form:
  fields:
    tabs:
      type: tabs
      active: 1

      fields:
        content:
          fields:
            header.an_example_text_field:
              type: text
              ordering@: 0
              label: Add a number
              default: 5
              validate:
                required: true
                type: int
👍 1
9 years ago

Thanks, I will try that later.

9 years ago

Works perfect (except that 0 seems to be reserved for the title field)

Suggested topics

Topic Participants Replies Views Activity
Support · by complanar, 6 days ago
6 139 15 hours ago
Support · by Rick Beebe, 6 days ago
2 100 2 days ago
Support · by blu3prince, 3 days ago
0 51 3 days ago
Support · by alex, 4 days ago
2 92 3 days ago
Support · by Marcel, 2 weeks ago
1 143 4 days ago