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

Make custom page headers editable via admin panel

Started by Muut Archive 11 years ago · 2 replies · 322 views
11 years ago

Hi guys!

Today I had a look at the admin panel. While playing around with its functionality several questions came to my mind.

For example:

I have a custom page header structure in some of my .md files to create content. Something like this:

slides:

  • image: image1.jpg
    heading: "We <strong>deliver</strong> nothing short of awesome !"
    subheading: "Check out our portfolio to see our great work.."

How can I make this comfortably editable in the admin panel? I had a look at some skeletons and found out about a "blueprints" folder inside the theme folder. Unfortunately I couldn't find any information regarding this inside the Grav manual. (is this going to be added to the docs?)

So I assume the following:

I need to create a "blueprints" folder inside my theme and create .yaml files with the name of the concerning template file. In this file I'm able to create form fields in the admin panel for my custom page headers. Do I really need as many files and restructures of the admin panel structure like in the antimatter theme blueprints or can I just "add" s ome field for my custom page headers?

Can someone walk me through the procedure with the above example? I would really appreciate this!

Thanks in advance!

11 years ago

hey bro, im having a very hard time installing this. is there something else to be done installing in a subfolder?

11 years ago

We do plan on having some example docs on this, but basically you are on the right path. if you look at one of the blueprints in antimatter, you will see that it extends the default, and typically adds a new tab with the custom fields.

This means you really only have to add the blueprint definitions for the new bits you are supporting, and not have to copy everything over.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1346 9 years ago
Archive · by Muut Archive, 9 years ago
2 933 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago