Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

How can I put fields above the original Content

admin

Started by Chris Jung 9 years ago · 3 replies · 804 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 webmasterodp, 7 days ago
4 152 6 days ago
Support · by nwhitfield, 1 week ago
2 132 1 week ago
Support · by stell, 3 weeks ago
5 368 2 weeks ago
Support · by gravinator, 1 month ago
5 557 2 weeks ago
Support · by Gravver, 3 weeks ago
6 344 3 weeks ago