Linking back to the page-root second level menu

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Linking back to the page-root second level menu

Post 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>
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Linking back to the page-root second level menu

Post by Dr.CSS »

Turn it into a link to where/what?...
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: Linking back to the page-root second level menu

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Linking back to the page-root second level menu

Post 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>
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: Linking back to the page-root second level menu

Post 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>
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Linking back to the page-root second level menu

Post 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>
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.
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Re: Linking back to the page-root second level menu

Post by fearmydesign »

ahh.... that's what I was missing.... thank you for your help.

Cheers,
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
Post Reply

Return to “Layout and Design (CSS & HTML)”