You are not logged in.
Pages: 1
We're looking to develop a few custom landing-pages that have different headers and footers than our standard pages.
From what I can tell, our pages are rendered by a 'default.php' file, that automatically includes the _header.php and _footer.php file, as well as whatever template was selected.
Is there a supported and/or best-practice approach to creating one-off landing pages?
I'm thinking that I need to set up a routed template, that includes a different header and footer? Am I correct in that assumption?
Thanks All!
-Ben
Offline
You can swap the layout on any template by setting $bigtree["layout"], see here:
https://www.bigtreecms.org/docs/dev-guide/templates/
The routed template's _header.php and _footer.php file are included before loading the content into a layout. BigTree parses inside-out with the template file first, then the layout. So in a routed template with a header and footer it would process files in this order:
- /templates/routed/test-template/_header.php
- /templates/routed/test-template/default.php
- /templates/routed/test-template/_footer.php
- Content is then wiped from the output buffer and placed in $bigtree["content"]
- /templates/layouts/default.php (which outputs $bigtree["content"])
Offline
Hello Ben,
If still issue is not resolved , contact me i will help you !
ian(dot)cisin10(at )gmail(dot)com
S k y p e : cis(dot)ian
Best
Ian
Offline
Pages: 1