Page 1 of 1

[SOLVED] Tags & Global Content Blocks...

Posted: Fri Apr 03, 2009 11:40 pm
by mr.bacan
Hello I'm wondering if it's possible to have a Global Content Block inside a Tag.
I've made this tag (central_content):
echo "" . $params['titulo'] . "\n";
echo "{global_content name='" . $params['block'] . "'}\n";
echo "\n";
to the use it like this:
{central content titulo='Page Title' block='Content_1'}
I get the title to print but the GCB doesn't. I know I'm must not doing it right at all, but I'm a PHP newbie.

Thanks for any support on this.

Mr.Bacan.

Re: Tags & Global Content Blocks...

Posted: Sat Apr 04, 2009 8:48 pm
by Ted
You'd have to do something like:

Code: Select all

echo "<div id=\"Box-2G-Top\">" . $params['titulo'] . "</div>\n"; 
echo "<div id=\"Box-2G-Center\">" . $params['block'] . "</div>\n"; 
echo "<div id=\"Box-2G-Bottom\"></div>\n";
And then:

Code: Select all

{global_content name='Content_1' assign='gcb_outout'}
{central_content titulo='Page Title' block=$gcb_outout}
The problem is that the output of a plugin wouldn't get parsed by smarty.  So this is the easiest workaround.

[SOLVED] Tags & Global Content Blocks...

Posted: Tue Apr 07, 2009 3:41 pm
by mr.bacan
;D Thank you very much Ted, this definetly solved my problem using Content Blocks, Tags and Parameters all together.