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

How can I put fields above the original Content

admin

Started by Chris Jung 9 years ago · 3 replies · 695 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 Paul Hodges, 4 weeks ago
19 484 5 days ago
Support · by Lauw, 7 days ago
2 99 7 days ago
Support · by Anna, 3 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 484 3 weeks ago