Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. 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 · 954 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, 4 weeks ago
4 490 3 weeks ago
Themes & Styling · by johan thomas, 5 years ago
1 811 3 weeks ago
Themes & Styling · by stuart young, 2 months ago
3 669 2 months ago
Themes & Styling · by Sebadamus, 3 months ago
5 690 2 months ago
Themes & Styling · by martynfoster735, 3 months ago
1 652 3 months ago