Page 1 of 5
da Blocks
Posted: Thu 24. Jan 2008, 21:59
by Jensensen
x
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Fri 25. Jan 2008, 08:51
by Heiko H.
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Fri 25. Jan 2008, 09:16
by update
really not the hottest news...
As far as I'm understanding it up to now this is something different. Before this we placed the tag {MYCOOLONEBLOCK} within the template...
But now we can place the {MYCOOLONEBLOCK} in a let's say CP html, place this anywhere (even in another custom block) and put content into it...
No need to fill the template with the replacement tags for custom blocks (you can do it still, anyway)
Am I getting the picture? If so -
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Fri 25. Jan 2008, 09:20
by marcus@localhorst
i think phpwcms has a lot of rarely documented features in vein of eastereggs
(apropos easteregg - impress your skype contacts when typeing
(mooning) into the textchat
)
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Fri 25. Jan 2008, 09:30
by Heiko H.
It seems as if claus/Jensensen were right. Sorry...
[OT]
marcus@localhorst wrote:(apropos easteregg - impress your skype contacts when typeing
(mooning) into the textchat
)
Look here
http://www.ice-blog.de/262-geheime-skyp ... -emoticons
[/OT]
Heiko...
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Fri 25. Jan 2008, 14:01
by Jensensen
x
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Wed 5. Mar 2008, 15:11
by daniel.grant
Jensensen,
I bookmarked this a while ago and thought it may be of use later and yes, it does really rock!!
In the template:
<my markup> {ACCORDION} </my markup>
In the article
{ACCORDION} - CP HTML: <my markup inner> {AC1} {AC2} {AC3} etc...
{AC1} - CP WYSIWYG: my content....
Yes, really like this idea of nested content blocks, very useful to be organising and reducing number of messy templates.
Thanks.
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Wed 5. Mar 2008, 17:23
by pepe
Hi freaks...
best way to "show" this beautifull and mighty feature of phpwcms, is NOT to describe it...
BUT TO SHOW it on an example...
So a NewBee is able, to undestand, why
that is a key-feature of our
one and only phpWCMS !!!
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Wed 5. Mar 2008, 17:51
by sustia
pepe wrote:Hi freaks...
best way to "show" this beautifull and mighty feature of phpwcms, is NOT to describe it...
BUT TO SHOW it on an example...
So a NewBee is able, to undestand, why
that is a key-feature of our
one and only phpWCMS !!!
Exact pepe, I would like to learn too
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Thu 6. Mar 2008, 11:54
by daniel.grant
I would consider myself a phpwcms noobie!! Anyway here's a quick example of how to use nested content blocks to facilitate the accordion effect.
For info about accordion check out
Pepe's guide or
the MooFx site which is where I took my Javascript and CSS from.
For info about content blocks visit this
post
1. Create a page layout
Here you create the names of your custom content blocks
2. Create a template
Be sure to select the moofx.css file that you already upload to your /inc_css/ folder and link to the mootools library found at /inc_js/mootools/mootools.js.
And most importantly add {ACCORDION} into your template where you want the Accordion to appear.
3. Select the template in the category you want utilise the Accordion effect in
4. Create a CP for the Accordion markup and JS
So once you've created an article in the correct category create a HTML CP (with the html and js that constructs the accordion) and choose Display: ACCORDION (so that the CP displays on your template where you put {ACCORDION})
Where you would normally put your bits of content you instead put a 'nested content block'. Here I use AC1, AC2 and AC3.
5. Create your content
Now it is just a case of creating CPs that display in either {AC1} {AC2} or {AC3}
Here is I use a plain text CP.
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Mon 10. Mar 2008, 21:28
by update
This is
real fun to work with - but take care that your nested nesting nests don't start overwhelming you and labyrinth-like hindering you to see the light of day again!
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Mon 24. Mar 2008, 09:02
by Oliver Georgi
NEVER!!!! put Mootools or any other JavaScript that might be called also from inside phpwcms into your template's head area.
Always use a frontend_render script that looks like this - the script filename (
here: $block['custom_htmlhead']['...script...']) is always used as array index:
Code: Select all
<?php
/* Load my special Mootools script */
$block['custom_htmlhead']['mootools.js'] = ' <script src="'.TEMPLATE_PATH.'inc_js/mootools/mootools-release-1.11.js" type="text/javascript"></script>';
/* Load Mootools in newer releases */
initMootools();
/* Load My custom JavaScript */
$block['custom_htmlhead']['my.js'] = ' <script src="'.TEMPLATE_PATH.'inc_js/my.js" type="text/javascript"></script>';
/* Load some other <head> positions */
$block['custom_htmlhead']['favicon1'] = ' <link rel="icon" href="favicon.ico" type="image/x-icon" />';
$block['custom_htmlhead']['favicon2'] = ' <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />';
/* IE <=6 Style Hack */
$block['custom_htmlhead']['IEhack'] = ' <!--[if lt IE 7]><style type="text/css"> #inner { height:300px; } </style><![endif]-->';
/* Hm I want to overwrite some default CSS */
$block['custom_htmlhead']['mycss'] = ' <style type="text/css">' . LF . ' <!--' . LF;
$block['custom_htmlhead']['mycss'] .= ' #header { ' . LF;
$block['custom_htmlhead']['mycss'] .= ' background: #F9E931 url(template/img/mozilla.png) no-repeat left top !important;' . LF;
$block['custom_htmlhead']['mycss'] .= ' background: #F9E931 url(template/img/ie.gif) no-repeat left top;' . LF;
$block['custom_htmlhead']['mycss'] .= ' }';
$block['custom_htmlhead']['mycss'] .= LF . ' //-->' . LF . ' </style>';
?>
Oliver
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Thu 27. Mar 2008, 18:37
by daniel.grant
why NEVER?
I mean I've done it quite a lot and it doesn't seemed to have caused any problems. But if there is a probably I should probably sort it out right?
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Thu 27. Mar 2008, 23:39
by Oliver Georgi
I like to cry
- I saw people using extensive templates. It's simpler to handle it with a single frontend_render script. You get better control.
Oliver
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Posted: Sat 29. Mar 2008, 01:27
by Jensensen
x