hibbitts-design / grav-theme-quark-open-publishing

A customized version of the Quark theme with Git Sync and 'chromeless' mode support.
http://demo.hibbittsdesign.org/grav-open-publishing-quark/
MIT License
21 stars 13 forks source link

hide_next_prev_page_buttons: true don't hide buttons on "sections" page #23

Closed m33m33 closed 5 years ago

m33m33 commented 5 years ago

Hi,

On the main section page (type: sections), the hide_next_prev_page_buttons: true attribute does not hide the next/prev buttons.

On leaf pages (type: section and subsections) the next/prev buttons are hidden.

It is a bit odd since "sections" pages shows prev/next buttons relating to other content.

Am I doing something wrong with this setting ? I want all next/prev buttons hidden for a complete sections/section/subsection tree)

Regards M33

paulhibbitts commented 5 years ago

Hi @m33m33 , the next/prev buttons should not appear on the top-level page of Sections, just the section and sub-section pages. For example, https://demo.hibbittsdesign.org/grav-open-publishing-quark/multi-section-page does not display these buttons but https://demo.hibbittsdesign.org/grav-open-publishing-quark/multi-section-page/section-one does.

Are you seeing something different on your install? Are you running the latest version of Quark Open Publishing? Perhaps also look at the example Sections to check page names/structure? https://github.com/hibbitts-design/grav-theme-quark-open-publishing/tree/master/_demo/pages/05.multi-section-page

Let me know what you see etc.

m33m33 commented 5 years ago

Hi @paulhibbitts here are screenshots of the section tree, and the settings appearance display next-prev = no expert mode headers appearance display next-prev = no next-prev

paulhibbitts commented 5 years ago

Hi @m33m33 , thanks for the additional information - very helpful!

Unfortunately Sections is designed to be a top-level page, and not a child page within another folder such as a Blog. This was done so the first level of the hierarchy can always be known by checking for the Grav pages folder and not increase the complexity of the template.

If you would like to customize the template Twig for this specific situation (and Sections being used only within a blog folder) you could try to change the following checks for pages to blog in the Twig template file sections:

https://github.com/hibbitts-design/grav-theme-quark-open-publishing/blob/master/templates/sections.html.twig#L37

https://github.com/hibbitts-design/grav-theme-quark-open-publishing/blob/master/templates/sections.html.twig#L59

https://github.com/hibbitts-design/grav-theme-quark-open-publishing/blob/master/templates/sections.html.twig#L79

If this works for you then you should create an inherited theme to store this change, so future updates to Quark Open Publishing does not overwrite it https://learn.getgrav.org/16/themes/customization. If you are working with the Open Publishing Space skeleton there is an inherited theme already setup for you called mytheme

paulhibbitts commented 5 years ago

Looking into this issue a bit more, and I think I see a way to support non top-level Sections pages... I will test this out a bit more and update this issue soon.

paulhibbitts commented 5 years ago

Hi @m33m33, please update to the latest theme release and let me know if that works for you.

m33m33 commented 5 years ago

Problem solved :-)

Thanks @paulhibbitts !

paulhibbitts commented 5 years ago

Great, thanks for letting me know!