Hey everyone,
I’m new to Grav and just ran into something. On the blog-index page I need to give every blogpost a different look. At the moment I have 5 different looks. What I hoped to do is to add a variable class to the frontmatter of the blogposts’ pages and that I could use this like this:
Also, I hoped that adding a class variable to the frontmatter, would cause an input field in the Admin panel, so that my client can change the classes per page.
I did not manage to make this work. Is there another way to make this work?
Yep, it worked! Another question about this issue; how can I make sure the class is editable from the Admin Panel? I don’t see an input for this. Can I add it in someway to the Admin Panel, so that my client can edit the classes herself?
Follow up question: I created a fully custom form in the Admin using the blueprints. Everything works really easy, but there is one thing I can’t get right. I have added a file upload to the form and now I try to call it in my template.
This is how I added the file upload in my blueprint: