Skip to content

(How) can I customize the various pages that all use the blog layout? Can I define "sublayouts" or pass parameters? #713

Discussion options

You must be logged in to vote

it seems like it ought to be possible to modify the code for these pages to still use blogpages but somehow pass the type of page along, and the blogpages layout could use conditionals to make these small additions. I've seen conditionals in the layouts, so I know that's possible, but I don't know how to pass the argument.

I think you could add in the page a setting (in the section between ---), for example:

PageType: verybeautiful

and then in the layout you can put a conditional:

<php if ($this->yellow->page->get("pageType")=="verybeautiful"): ?>
....
<?php endif; ?>

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@markseuffert
Comment options

@cellio
Comment options

Answer selected by annaesvensson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants