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.

Support

How can I put fields above the original Content

admin

Started by Chris Jung 9 years ago · 3 replies · 546 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 Thomas, 1 week ago
2 57 15 hours ago
Support · by Anna, 3 days ago
2 65 18 hours ago
Support · by Justin Young, 18 hours ago
1 33 18 hours ago
Support · by Duc , 1 week ago
2 68 5 days ago
Support · by Colin Hume, 1 week ago
2 60 6 days ago