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

How to add custom Tab in page editor in Admin Panel?

admin first-time

Solved by pamtbaau View solution

Started by Kaira del Rosario 4 years ago · 2 replies · 902 views
4 years ago

Hello! I am currently working on a grav theme and just figured out how to make modular pages. One of these pages has an option to include several buttons. This is my md file for it.

YAML
---
title: header
anchor: header
buttons:
    - text: Click me
      url: #
---

I would like it to look like this (except it says buttons instead of blog item):
image|690x66

How would I go about doing that?
Thank you!

4 years ago Solution

@kairari, You'll need to create/update the blueprint for the page type at hand.

In the blueprint, you can add a tab with your own field to add the buttons.

Take a look at the blueprint for the "Blog Item" in user/themes/quark/blueprints/item.yaml. It adds the "Blog Item" tab to the default page blueprint.

last edited 06/30/22 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by FrViPofm, 16 hours ago
1 30 3 hours ago
Themes & Styling · by stuart young, 1 month ago
3 480 1 month ago
Themes & Styling · by Sebadamus, 2 months ago
5 481 2 months ago
Themes & Styling · by martynfoster735, 2 months ago
1 460 2 months ago
Themes & Styling · by Justin Young, 2 months ago
1 490 2 months ago