Hello, I’m new to Grav. I’m trying to created a new tab to add disclosures to the page. The pages I’m creating are different events that require their own custom disclosures and not just the same info.
I’ve created a template for Event pages in my custom theme (event.html.twig). I created a blueprints folder within my custom theme and created an event.yaml blueprint.
Here is my Blueprint code. Am I missing something. I’ve cleared the cache. I’ve even copied code from the Antimatter theme but nothing changes.
Hi
It may be that line 7 should be “tab” not “tabs”. Also I don’t know if its copy/paste into the forum but you should only have 2 spaces for your indents, this looks more like tabs which would kill it.
so like:
title: ‘Price List’
’@extends’:
type: default
I reformatted my code with your suggestions @csixtyfour …removed the tabs and just did two spaces…still no cigar though. It’s just weird because even creating a blueprint via devtools doesn’t result in any changes in the admin.
Spaces are key as mentioned. Also the title and form need to be on the same column. And there are a few indents you are missing, which is super important to get right with a blueprint file. Check this out:
Because '@extends' is a child of title, you want to reset your indentation for form. Also you want to make sure you keep all properties of an item on the same column and only indent for child items. Hope that makes sense. Let me know if that works for you!
Omg you guys are awesome and yes I was able to get the tabs to display now. Apparently my text editor kept converting my indents to tabs instead of spaces. A quick change in my editors preferences helped. Also checked my yaml against an online validator to make sure there wasn’t any simple errors like tabs. I really appreciate all of the help.
This may be a dumb question, but can you have more than one custom Tab? I have the Disclosure tab showing as intended but if I wanted to add say a Features tab as well, is that possible? Or do I have to work within that one custom tab?
I’ve tried this but it doesn’t output an Accordion Tab