hibbitts-design / grav-skeleton-open-publishing-space

Open Publishing (Blogging) Space uses a customized version of the Quark theme to support the creation, sharing and collaborative editing of Markdown-based blogs. Includes Admin Panel and Git Sync plugins.
https://demo.hibbittsdesign.org/grav-open-publishing-quark/
MIT License
27 stars 16 forks source link

Sidebar show check #7

Closed andrewtheone closed 5 years ago

andrewtheone commented 5 years ago

I was looking at the sourcecode of the theme, and cant figure out how does it determine if the sidebar should be shown or not. I see ing blog.html.twig that it sets a variable show_sidebar, but when it comes to populating the sidebar block it only checks router parameters, i could not find any other place where show_sidebar variable is used.

paulhibbitts commented 5 years ago

Hi @andrewtheone , with the Quark theme (the parent theme of Quark Open Publishing) show_sidebar is used in the layout.html.twig file to determine if the sidebar is shown on Blog-type pages. Here is where the check is made: https://github.com/hibbitts-design/grav-theme-quark-open-publishing/blob/master/templates/partials/layout.html.twig#L16-L21

The value of show_sidebar is set in various spots, for example for Blog listing page: https://github.com/hibbitts-design/grav-theme-quark-open-publishing/blob/master/templates/partials/layout.html.twig#L16-L21

Please let me know if that info is of help. Paul ps - a technique I've used in the past for learning how sourcecode works in a theme is to download the theme files locally and then use a global search in a text/code editor (I use Atom.io) for certain terms (i.e. show_sidebar), etc

paulhibbitts commented 5 years ago

I will close this now, but if you still need assistance re-open it.