Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Converting blog-template to porftolio template?

Solved by pamtbaau View solution

Started by Mikkeli Kerttunen 4 years ago · 1 replies · 689 views
4 years ago

Hi!

Just installed skeleton blog and I'm using Quark-theme.

I would like to make a second "blog-template" as a portfolio.

When I go to user/themes/quark/templates folder and make a copy of "blog.html.twig" as "portfolio.html.twig" I can modify all the needed files in partial folder (for example blog-list-item.html.twig).

There's one problem with this method. When I rename the template file to portfolio I lose the "blog-config" tab in admin panel:
image|690x361

I just want to have breadcrumbs, sidebar and pagination disabled in portfolio.

What is the correct method I lose the blog-config tab in Admin panel to disable those items in new portfolio.html.twig -file? Or can I somehow keep the tab in the Admin panel?

{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}

4 years ago Solution

@mikselli,

@mikselli:
There’s one problem with this method. When I rename the template file to portfolio I lose the “blog-config” tab in admin panel:

You should copy and rename theme's /blueprints/blog.yaml too

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 2 weeks ago
4 248 2 weeks ago
Support · by nwhitfield, 2 weeks ago
2 213 2 weeks ago
Support · by stell, 4 weeks ago
5 458 3 weeks ago
Support · by gravinator, 2 months ago
5 637 3 weeks ago
Support · by Gravver, 1 month ago
6 430 4 weeks ago