#1 November 4, 2016 1:29pm

bshoemaker
Member
Registered: June 20, 2016
Posts: 5

Landing Page - Custom Header / Footer

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

#2 November 4, 2016 1:33pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Landing Page - Custom Header / Footer

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

#3 November 5, 2016 5:20am

ian619
Member
Registered: November 5, 2016
Posts: 1

Re: Landing Page - Custom Header / Footer

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

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.