#1 July 21, 2012 10:13pm

swgamerx
Member
Registered: July 17, 2012
Posts: 17

Template/Themes

I'm a little confused how developing a layout and stylesheets works in Bigtree even though iv done it in multiple CMSs and frameworks over the years. Are there any tutorials on how to do it? what is most confusing is I cannot select a theme or anything in backend so I assume 1 theme per site, hard coded?

Offline

#2 July 21, 2012 10:15pm

swgamerx
Member
Registered: July 17, 2012
Posts: 17

Re: Template/Themes

On a side note if no tutorials exist I'd be willing to write one up or do a video tutorial once I understand how to do it myself.

Offline

#3 July 24, 2012 11:59am

benplum
Administrator
Registered: March 30, 2012
Posts: 54

Re: Template/Themes

You are correct, BigTree doesn't use 'themes' - just raw assets and templates. But it doesn't mean you can't have multiple 'mini-sites,' all with their own unique designs.

If you take a look at the example site's 'home' layout you'll see it includes a header, then echos the content (defined in the page's template), then includes the footer:

To switch the site's appearance simply create a new layout, let's say "mini-site.php":

Now any page set to use the 'mini-site' layout will be rendered using the mini-site's header and footer. You can set the layout for the current page in the selected template:

$bigtree["layout"] = "mini-site";

Offline

#4 July 24, 2012 8:45pm

swgamerx
Member
Registered: July 17, 2012
Posts: 17

Re: Template/Themes

cool, I feel even more lost though. are there any tutorial videos that walk through the construction of a site using BigTree? i'm a very visual learner and if I watch someone do It i'll catch on quicker. I'm just lost as to how everything is interconnected. Its so different from other CMS out there.

Offline

#5 July 25, 2012 9:53am

benplum
Administrator
Registered: March 30, 2012
Posts: 54

Re: Template/Themes

Sorry, there aren't any videos at this time - but we are always open to community contributions!

Pages are rendered by BigTree using an "inside-out" flow:

1. Template
The template file is executed first, this is either 'Basic' (a single .php file) or 'Routed' (a group of files that work together) depending on the template the current page is set to use. Templates should contain any page-specific pieces. This content will be inserted into the layout in the next step. You can switch layouts by setting the variable $bigtree["layout"] to the name of the desired file, excluding the '.php' extension.

2. Layout
The content rendered by the page template is then inserted into the layout. Layouts should include any supporting or reused elements, like a global header, navigation and footer. These can be drawn directly in the layout file or included from separate .php files. The content rendered by the template in the first step is inserted by echoing the variable $bigtree["content"].

3. Render
Once the template has rendered content and that content has been inserted into the layout BigTree will send the page off to the user's browser.

*Note: This "inside-out" method of page rendering is made possible by a technique known as output buffering. Read more about how output buffering works.

Offline

#6 July 25, 2012 11:22am

swgamerx
Member
Registered: July 17, 2012
Posts: 17

Re: Template/Themes

that makes sense. One of the other things that confuses me is how content is produced. I'v looked at the example site and I cannot find the pages or modules that contain the videos showing rainbows called Visions. BigTree seems to do everything really well, i'm just having trouble wrapping my head around how to get started.

Offline

#7 July 25, 2012 2:40pm

benplum
Administrator
Registered: March 30, 2012
Posts: 54

Re: Template/Themes

That's actually the older example site, the newer version (available with the latest beta) follows the standard page-tree based site structure more closely. We feel the current incarnation is better example of the different design patterns possible with BigTree, everything from the standard hierarchical pages to dynamic module-driven content to reusable callouts.

However, to answer your question the videos are being pulled into the site by the YouTube API module. It's using the title of the current "Wonder" - the main content of the older example site - to search the vast YouTube landscape for related videos. One of the goals of that example site was to show how simple content curation, not just creation, is in BigTree.

Offline

#8 July 25, 2012 11:46pm

swgamerx
Member
Registered: July 17, 2012
Posts: 17

Re: Template/Themes

Updated to Beta 7, this makes a lot more sense than 6 did.

Offline

Board footer

Powered by FluxBB

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