Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How can I put fields above the original Content

admin

Started by Chris Jung 9 years ago · 3 replies · 940 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 TomW, 2 weeks ago
8 227 8 hours ago
Support · by alex, 2 months ago
8 667 23 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 159 3 days ago
Support · by TomW, 6 days ago
2 106 5 days ago