da Blocks
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
Hi Jensensen,
really not the hottest news...
http://forum.phpwcms.org/viewtopic.php?p=31241#31241
http://forum.phpwcms.org/viewtopic.php?p=32959#32959
...
This really is not meant badly.
Regards Heiko.
really not the hottest news...
http://forum.phpwcms.org/viewtopic.php?p=31241#31241
http://forum.phpwcms.org/viewtopic.php?p=32959#32959
...
This really is not meant badly.
Regards Heiko.
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
As far as I'm understanding it up to now this is something different. Before this we placed the tag {MYCOOLONEBLOCK} within the template...really not the hottest news...
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 -
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
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 )
(apropos easteregg - impress your skype contacts when typeing (mooning) into the textchat )
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
It seems as if claus/Jensensen were right. Sorry...
[OT]
[/OT]
Heiko...
[OT]
Look here http://www.ice-blog.de/262-geheime-skyp ... -emoticonsmarcus@localhorst wrote:(apropos easteregg - impress your skype contacts when typeing (mooning) into the textchat )
[/OT]
Heiko...
-
- Posts: 97
- Joined: Thu 2. Nov 2006, 15:42
- Location: London
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
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.
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!!!
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 !!!
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!!!
Exact pepe, I would like to learn toopepe 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 !!!
Campeones del mundo!
Vegetables!
Vegetables!
-
- Posts: 97
- Joined: Thu 2. Nov 2006, 15:42
- Location: London
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
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.
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!!!
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!
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
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:
Oliver
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>';
?>
-
- Posts: 97
- Joined: Thu 2. Nov 2006, 15:42
- Location: London
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
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?
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?
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Nested Custom Content Blocks - really rocks!!! - Wow!!!
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
Oliver