Hello,
I'm interested in a tag/module I can use to check for a specific page, and then display content based on that. It won't always be an image, so the 'section image' tag won't do.
It would be great if it could check for multiple pages at the same time.
So for example:
if section = home,about,contact
display code
I've found the CustomContent module, but I'm new to the smarty language, and have tried to numerous ways, and can't get it working.
If anybody can point in to a tag/module, or give specific code, that would be great.
"If Section/Page" Like Tag
Re: "If Section/Page" Like Tag
Any takers on this? Pretty important to me.
Cheers,
Cheers,
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: "If Section/Page" Like Tag
check out the CGSimpleSmarty module.
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: "If Section/Page" Like Tag
Great, thanks for the super quick response.
Little question though, being new to the smarty language.
I'm basically just trying to find specific pages, not parents of children. At least for the most part.
Here is the code I quickly whipped up to test
{$cgsimple->get_parent_alias($page)}
{if $page == "about-us"}
About Us Page Only
{/if}
Works great, except when I view children pages, I get the output of this line {$cgsimple->get_parent_alias($page)}.
Mind sharing example of how to just store the variable to test, without outputting anything?
*Edit* Nevermind, figured it out by using:
{$cgsimple->get_parent_alias('',$page)}
{if $page == "about-us" | $page == "extensions"}
Certain pages only
{/if}
If there is a more efficient way to do multiple pages, feel free to let me know. If not, this works great. Thanks for pointing me in the right direction.
Little question though, being new to the smarty language.
I'm basically just trying to find specific pages, not parents of children. At least for the most part.
Here is the code I quickly whipped up to test
{$cgsimple->get_parent_alias($page)}
{if $page == "about-us"}
About Us Page Only
{/if}
Works great, except when I view children pages, I get the output of this line {$cgsimple->get_parent_alias($page)}.
Mind sharing example of how to just store the variable to test, without outputting anything?
*Edit* Nevermind, figured it out by using:
{$cgsimple->get_parent_alias('',$page)}
{if $page == "about-us" | $page == "extensions"}
Certain pages only
{/if}
If there is a more efficient way to do multiple pages, feel free to let me know. If not, this works great. Thanks for pointing me in the right direction.
Last edited by LeeUmm on Mon Jan 28, 2008 9:58 pm, edited 1 time in total.