[SOLVED] Tags & Global Content Blocks...

General project discussion. NOT for help questions.
Post Reply
mr.bacan

[SOLVED] Tags & Global Content Blocks...

Post 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.
Last edited by mr.bacan on Tue Apr 07, 2009 3:41 pm, edited 1 time in total.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Tags & Global Content Blocks...

Post 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.
mr.bacan

[SOLVED] Tags & Global Content Blocks...

Post by mr.bacan »

;D Thank you very much Ted, this definetly solved my problem using Content Blocks, Tags and Parameters all together.
Post Reply

Return to “General Discussion”