Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

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 · 843 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 stuart young, 2 weeks ago
3 251 2 weeks ago
Themes & Styling · by Sebadamus, 3 weeks ago
5 317 3 weeks ago
Themes & Styling · by martynfoster735, 4 weeks ago
1 310 4 weeks ago
Themes & Styling · by Justin Young, 1 month ago
1 348 1 month ago
Themes & Styling · by Slebeig, 2 months ago
4 474 2 months ago