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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

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 · 692 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 Pedro M, 2 months ago
4 198 2 months ago
Themes & Styling · by Ian, 2 months ago
3 94 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 455 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 48 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 128 3 months ago