NAVIGATION
CUSTOM_BLOCKS are one of the most versatile neat LITTLE things within the system of phpwcms. Used in an appropriate manner they'll give you almost indefinite possibilities to set up and style your content.
For example you can throw in some Content Part HTML with two columns if needed and target these two columns with other contentparts. This is really cool and we are going to provide you with the basics and some nice code snippets to pick up ….
To have a working set of CUSTOM_BLOCKS at first you should sit down, lean back and do some little sketches how they would fit best and do some consideration about their naming convention.
Well, you could do so, but you can jump into it right now:
Go ahead and open (well, we are working with the back end ) admin » page layout » your special_page_layout (or the default if you have never done that before). Here you will find a field labeled “custom”. Fill in some blocks:
ABOVE_CONTENT, COL1, COL2
Save your page layout!
Now you'll like to navigate to admin » templates to select a template. If you have done that never before there will be a default template still to be opened. Here you can assign your previously changed page layout.
After saving it you will find your CUSTOM_BLOCKS below.
Look for that field labeled “ABOVE_CONTENT” and fill in something like
<div class="splash"> <div class="splash-inner"> <div class="splash-innerpadding clearfix">{ABOVE_CONTENT}</div> </div> </div>
and save again. Nothing has happened, nothing did hurt? Fine!
Assuming that you are setting up your page by rendering it custom (from template's main block) you now can place your CUSTOM_BLOCK right above your content like so:
<!--other stuff before--> {ABOVE_CONTENT} {CONTENT} <!--other stuff after-->
<note important>Every time you are adding or deleting a CUSTOM_BLOCK you should edit and save all of your page templates thusly enabling the system to reflect the changes. Otherwise you will not be able to choose the output position “CUSTOM_BLOCK” when editing articles!</note>.
Peeew! That's done!
Come on - we are quite there!
When opening your article and editing / adding a new Content Part you will find your newly created blocks by pulling down that pull down menu labeled “display”. Here you will define the output location. Since your main article (the headline, sub headline and teaser text) is always displayed within {CONTENT} you are able to place a Content Part right above of it by choosing “ABOVE_CONTENT” as it's output location. This is pretty cute / neat / tricky whatever
And because of the order of your three new blocks you even can nest them so that COL1 and COL2 can reside within ABOVE_CONTENT (in case you'd like to do so
But this is a completely different story