Hi
I trying to achieve the following.
I my left column I have a global content block that shows on all pages.
Is there a way to show this content block only on specific pages?
Thanks
[SOLVED] Hide global content block from some pages
[SOLVED] Hide global content block from some pages
Last edited by klendino on Wed Jul 31, 2013 2:08 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Hide global content block from some pages
There are lots of ways.
but the most basic one is:
but the most basic one is:
Code: Select all
{if $page_alias == 'foo' || $page_alias == 'bar'}
{global_content name='my_gcb'}
{/if}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Hide global content block from some pages
Different templates? Easy to implement after reading http://www.i-do-this.com/blog/86/Smarty ... ade-Simple
and using one of the latest versions of CMSMS.
Other option: (mis)use on of the 'extra page attribute' fields (options tab of 'Edit content' page.
In template:
In this example you need to type 'skipGCB' (without quotes that is) in the 'extra page attribute 1' field.
If it needs to be more user friendly/fool proof consider using a module like http://dev.cmsmadesimple.org/projects/econtentblocks and add a checkbox.
and using one of the latest versions of CMSMS.
Other option: (mis)use on of the 'extra page attribute' fields (options tab of 'Edit content' page.
In template:
Code: Select all
{page_attr key='extra1' assign='ex1'}{if $ex1 != 'skipGCB'}{global_content name='my_gcb'}{/if}
If it needs to be more user friendly/fool proof consider using a module like http://dev.cmsmadesimple.org/projects/econtentblocks and add a checkbox.
Re: [SOLVED] Hide global content block from some pages
Thanks for the answers.
Went with Calguy's option and that did the trick.
Went with Calguy's option and that did the trick.