Page 1 of 1
Linking back to the page-root second level menu
Posted: Mon Feb 07, 2011 6:44 pm
by fearmydesign
Hi, I need to turn my title into a link, right now it's pulling the correct title by using the following code:
{$cgsimple->get_root_alias('','root_alias')}{$cgsimple->get_page_title($root_alias)}
But I tried to turned this into a link, but it takes all the way back to the main index page... can you help me?
<h2><a href="{$cgsimple->get_root_alias('','root_alias')}">Title goes here</a></h2>
Re: Linking back to the page-root second level menu
Posted: Mon Feb 07, 2011 6:46 pm
by Dr.CSS
Turn it into a link to where/what?...
Re: Linking back to the page-root second level menu
Posted: Mon Feb 07, 2011 6:50 pm
by fearmydesign
Dr.
www.anchorbridge.com inside each section, I want to turn the main H2 titles into links, but not back to the main index page, rather the main section home page... if you click on it now, it takes me all the way back to the main index page.
thx
Re: Linking back to the page-root second level menu
Posted: Mon Feb 07, 2011 6:54 pm
by Dr.CSS
What ever you are doing it is giving an empty links is why it goes to home page...
<a href="">Marine Industry</a>
Re: Linking back to the page-root second level menu
Posted: Mon Feb 07, 2011 7:11 pm
by fearmydesign
this is my link, it's not empty
Code: Select all
<h2><a href="{$cgsimple->get_root_alias('','root_alias')}">Title goes here</a></h2>
Re: Linking back to the page-root second level menu
Posted: Mon Feb 07, 2011 7:18 pm
by calguy1000
You're using $cgsimple->get_root_alias wrong.... if the second parameter is specified it will assign the resulting alias to the smarty variable you have named. it will not echo out any data.
so using your syntax: proper method would be:
Code: Select all
<h2><a href="{$cgsimple->get_root_alias('','root_alias')}{$root_alias}">Title goes here</a></h2>
or just do this:
Code: Select all
<h2><a href="{$cgsimple->get_root_alias()}">Title goes here</a></h2>
Re: Linking back to the page-root second level menu
Posted: Mon Feb 07, 2011 7:23 pm
by fearmydesign
ahh.... that's what I was missing.... thank you for your help.
Cheers,