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.

Support

Converting blog-template to porftolio template?

Solved by pamtbaau View solution

Started by Mikkeli Kerttunen 4 years ago · 1 replies · 349 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 Thomas, 1 week ago
2 55 13 hours ago
Support · by Anna, 3 days ago
2 60 15 hours ago
Support · by Justin Young, 16 hours ago
1 31 16 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 58 5 days ago