Jump to content

Adding Links to .tpl files? Rate Topic   - - - - -

 
  • WebGuy
  • Senior Member
  • Members
  • Join Date: 02-Dec 08
  • 419 posts

Posted 22 January 2009 - 04:06 PM #1

I'm trying to add a link to the login page in the customer/mail/profiles_info.tpl

Now I know I can just add the exact link as in:

Quote

<p><a href="https://www.mysite.com/index.php?target=auth&mode=login_form">Go To My Account Login Page</a></p>

I would like to know how to path links in smarty templates. Just to learn the correct method for doing this:

In the recover_password.tpl there is a link that is an auto login for those looking to recover their password:
<a href="{$http_location}/{$index_script}?{$target_name}=auth&{$mode_name}=recover_password&ekey={$ekey}">{$http_location}/{$index_script}?{$target_name}=auth&{$mode_name}=recover_password&ekey={$ekey}</a>
I've tried to use the same "methodology" for the link to the login page but everything I try redirects me to the home page?

<a href="{$http_location}/{$index_script}?{$target_name}=auth&{$mode_name}=login_form">Go To My Account Login Page</a>

Why doesn't this work?
Any help here would be appreciated.

Thanks
WebGuy
www.nutraceaonline.com
CS-CART VERSION: 1.3.5 SP4

 
  • MikeFold
  • Senior Member
  • Members
  • Join Date: 24-Nov 06
  • 1,034 posts

Posted 22 January 2009 - 05:41 PM #2

Web Guy
Are you saying the "hard-coded" link you have above works?
<p><a href="https://www.mysite.com/index.php?target=auth&mode=login_form">Go To My Account Login Page</a></p> 

I ask because where did you come up with mode=login_form
Seamlessly Upgraded to 1.3.5sp4 from 1.3.4sp3
Live: Playboy Collectors Gallery
(Adult)


LOOKING FOR A FEW COPIES OF THE NEW LITHUANIA PLAYBOY ISSUES...AND COLOMBIA ISSUES.....
FEEL FREE TO Private Message Me....THANKS


Slightly Modded Default Red | Zardos Lightbox | Sitemap | Multicards Payment Mod |
Cart & Checkout Pages Modified |

 
  • WebGuy
  • Senior Member
  • Members
  • Join Date: 02-Dec 08
  • 419 posts

Posted 22 January 2009 - 06:07 PM #3

Hey Mike,

Yeah, the hard-coded link works fine...as long as I'm not already logged in.
If I'm logged in the hard-coded link redirects to the home page.

Hmmm...maybe I tested the other smarty link when I was logged in?
I'll check to make sure and get back to you.
WebGuy
www.nutraceaonline.com
CS-CART VERSION: 1.3.5 SP4

 
  • WebGuy
  • Senior Member
  • Members
  • Join Date: 02-Dec 08
  • 419 posts

Posted 22 January 2009 - 06:12 PM #4

Yep...duh? I'm stupid...I was testing the link when I was logged in and didn't realize I had to log out first...LOL

Way too many Browser windows open at the present time.

Thanks for asking the question though...it helped engage my brain again.
WebGuy
www.nutraceaonline.com
CS-CART VERSION: 1.3.5 SP4

 
  • WebGuy
  • Senior Member
  • Members
  • Join Date: 02-Dec 08
  • 419 posts

Posted 22 January 2009 - 06:16 PM #5

Forgot to answer your question:

Quote

I ask because where did you come up with mode=login_form

I just scrolled over the "Log in" link in the my account sidebox and check the "status" bar on the bottom of the browser OR right-click the link and select properties...

I haven't turned SEO on yet so I'm seeing the full URLs.

Thanks again
WebGuy
www.nutraceaonline.com
CS-CART VERSION: 1.3.5 SP4