How to Output PHP Code through CMSB?
12 posts by 4 authors in: Forums > CMS Builder
Last Post: February 14, 2011 (RSS)
By Toledoh - February 14, 2011
This has really got me thinking :)
We need to select a page template for the layout of page, and a CSS templates for the "theme" of the page.
I guess firstly, there has to be some base template... ie. headers | navigation | content | footer. And then the templates could aply to the "content" area, ie. 1 column, 2 column and 3 columns.
Then, within CMSB, have a "modules" section... for dynamic content, ie. News Module, Gallery Modules, Advertising Module, Product Module etc.
Then, define for each module, 2 php includes, one a simple style that would fit in a side column, and the other a detailed style that would fit in a main content area. I think each include should utilise similar CSS. This way, we could globally define themes quite easily.
I would build the navigation of the site, with the top level set with standard buttons, and the drop downs grown from a multi-section editor in CMSB. As you add a record, you choose a "category" so to apply it to the drop-down for that button.
In that editor, have a title to appear in the drop down, then choose which page template (1, 2 or 3 columns). Using the Show/Hide Dependant Fields plugin, this will give you 1, 2 or 3 content areas. Also, which theme template (or this could be site wide).
Within each content area have the ability to select which "module" you want to appear. In the 1st or 3rd columns, the choice of "news" would then add the simple news inlcude into the page, whereas choosing "news" in the 2nd column would include the detailed include.
Each column should also have a WYSIWYG field, so if that column only had text - so be it, just select "none" for the module choice. Or, you could use the field to include an introduction before the modular content.
So, in theory, this should deliver;
1. A consistent style to the site
2. Ability to choose page layouts for individual pages
3. Ability to choose modular components to any section of the pages
4. Ability to select css themes to the site / page.
This will all work for list pages, but would need to think about the detail page for a module...
There's my brain dump :) your thoughts?
We need to select a page template for the layout of page, and a CSS templates for the "theme" of the page.
I guess firstly, there has to be some base template... ie. headers | navigation | content | footer. And then the templates could aply to the "content" area, ie. 1 column, 2 column and 3 columns.
Then, within CMSB, have a "modules" section... for dynamic content, ie. News Module, Gallery Modules, Advertising Module, Product Module etc.
Then, define for each module, 2 php includes, one a simple style that would fit in a side column, and the other a detailed style that would fit in a main content area. I think each include should utilise similar CSS. This way, we could globally define themes quite easily.
I would build the navigation of the site, with the top level set with standard buttons, and the drop downs grown from a multi-section editor in CMSB. As you add a record, you choose a "category" so to apply it to the drop-down for that button.
In that editor, have a title to appear in the drop down, then choose which page template (1, 2 or 3 columns). Using the Show/Hide Dependant Fields plugin, this will give you 1, 2 or 3 content areas. Also, which theme template (or this could be site wide).
Within each content area have the ability to select which "module" you want to appear. In the 1st or 3rd columns, the choice of "news" would then add the simple news inlcude into the page, whereas choosing "news" in the 2nd column would include the detailed include.
Each column should also have a WYSIWYG field, so if that column only had text - so be it, just select "none" for the module choice. Or, you could use the field to include an introduction before the modular content.
So, in theory, this should deliver;
1. A consistent style to the site
2. Ability to choose page layouts for individual pages
3. Ability to choose modular components to any section of the pages
4. Ability to select css themes to the site / page.
This will all work for list pages, but would need to think about the detail page for a module...
There's my brain dump :) your thoughts?
Cheers,
Tim (toledoh.com.au)
Tim (toledoh.com.au)
Re: [Toledoh] How to Output PHP Code through CMSB?
Hi ,Tim -
Here's an example of just such a site:
www.railexclusive.com
I built this at the end of last year. It's probably my most advanced CMSB creation to date.
In terms of layout choices, the user gets to choose from a small selection of simple layouts, the type of margin and the type of masthead.
The gripe, however, is that all of the choices, variables and includes need to be added directly to the index page code. You end up with endless if/elseif statements...
This is both clunky and messy. I'd much rather find a way for CMSB to output the code based on the user's selections.
:0)
Perch
Here's an example of just such a site:
www.railexclusive.com
I built this at the end of last year. It's probably my most advanced CMSB creation to date.
In terms of layout choices, the user gets to choose from a small selection of simple layouts, the type of margin and the type of masthead.
The gripe, however, is that all of the choices, variables and includes need to be added directly to the index page code. You end up with endless if/elseif statements...
This is both clunky and messy. I'd much rather find a way for CMSB to output the code based on the user's selections.
:0)
Perch