Hi All,
I'm trying to find a way of calling a GCB depending on what page the viewer is current on. So this is what I've tried:
{global_content name='home'}
{global_content name='{title}'}
So the intention is that the correct GCB will be called for a page i.e. home GCB for home page, contact GCB for contact etc.
Of course my attempt doesn't work: string(61) "Smarty error: unable to read resource: "globalcontent:{title"" }
So I'm wondering whether creating a UDT to do something would be more appropriate? I'm not hot on UDT's so I could sure do with some pointers...
Sarah
Calling GCB depending on page?
Re: Calling GCB depending on page?
sarah_h wrote: I'm trying to find a way of calling a GCB depending on what page the viewer is current on. So this is what I've tried:
{global_content name='home'}
{global_content name='{title}'}
So the intention is that the correct GCB will be called for a page i.e. home GCB for home page, contact GCB for contact etc.

GCB is usefull because you can re-use on many pages but USELESS for ALL pages
If you want you can use {global_content name="$page_alias"}
but my advice is: use ANOTHER content block
{content block="second_content"}
Alby
Re: Calling GCB depending on page?
What is the use for a GCB, when it is different based on the page it is on, that seems more like calling a second content-block instead.
GCBs are for re-usable content. $page_alias could be used btw.....
Ronny
GCBs are for re-usable content. $page_alias could be used btw.....
Ronny
Re: Calling GCB depending on page?
Thnaks for your comments on this. I'm confused because I thought this would be the best way to do what I want 
I have 1 template from which I want to call different content depending on page name. But I can see what you both mean. You're right, of course, and I'd be able to see the content for a particular page.
Ok, my method is plainly wrong!!! I'll do it using content blocks.
Thank both of you for putting me straight.
Sarah

I have 1 template from which I want to call different content depending on page name. But I can see what you both mean. You're right, of course, and I'd be able to see the content for a particular page.
Ok, my method is plainly wrong!!! I'll do it using content blocks.
Thank both of you for putting me straight.
Sarah