Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

custome text button link to another page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-08-2005, 08:06 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default custome text button link to another page

I am trying to create a text button link that will direct the user to another page.

I try entering this code into my head.tpl below the customer/top_menu.tpl tag but I keep gettin a smarty error and nothing loads. Don't understand?

code:
<TD valign="top" align="right">
{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}

{ {$lng.lbl_Login}}
</TD>

Thanks for the help.
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #2  
Old 08-08-2005, 08:08 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

You don't need brackets around non-smarty stuff. Replace this:

{ {$lng.lbl_Login}}

with this:

{$lng.lbl_Login}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 08-08-2005, 08:15 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

I did that and got no error. Thanks

But now I can't see the "Login" button by the phone numbers at the top of the page?
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #4  
Old 08-08-2005, 08:21 AM
  Dongan's Avatar 
Dongan Dongan is offline
 

X-Wizard
  
Join Date: Jul 2005
Location: www.mercuryminds.com
Posts: 1,531
 

Default Re: custome text button link to another page

Quote:
Originally Posted by mmoskva
I am trying to create a text button link that will direct the user to another page.

I try entering this code into my head.tpl below the customer/top_menu.tpl tag but I keep gettin a smarty error and nothing loads. Don't understand?

code:
<TD valign="top" align="right">
{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}

{ {$lng.lbl_Login}}
</TD>

Thanks for the help.

Here is the correct code..
Code:
<TD valign="top" align="right"> {if $usertype eq "C"} {include file="customer/top_menu.tpl"} {/if} {$lng.lbl_Login} </TD>

Balinor is right and he suggested to remove only the braces. He did't suggest to replace the complete code with he has provided.
Reply With Quote
  #5  
Old 08-08-2005, 08:31 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

Thanks for getting back with me.

This is the home.tpl file that I integrated your suggestions into and a link to my site so you can view my problem. I cannot see any "Login" txt button at the top of the page? Their is an authentiation menu but their is a seperate page created for the Login and Registery.

http://www.michaelmoskva.com/xcart/home.php

Thanks for you help

Code:
{* $Id: head.tpl,v 1.40.2.3 2004/11/19 06:40:15 max Exp $ *}
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD width="27"></TD>
<TD>[img]{$ImagesDir}/xlogo.gif[/img]</TD>
<TD valign="top" align="right">
{if $usertype eq "C"}
{include file="customer/top_menu.tpl"}
{/if}

{$lng.lbl_Login}
</TD>
</TR>
</TABLE>
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD colspan="2" class="VertMenuBorder">[img]{$ImagesDir}/spacer.gif[/img]</TD>
</TR>
<TR>
<TD class="HeadLine" height="22">
{if $usertype eq "C"}
{ include file="customer/search.tpl" }
{/if}
</TD>
<TD class="HeadLine" align="right">
{if ($usertype eq "C" || $usertype eq "B")and $all_languages_cnt gt 1}
<TABLE border="0" cellpadding="0" cellspacing="0">
<FORM action="home.php" method="GET" name="sl_form">
<INPUT type="hidden" name="redirect" value="{$smarty.server.PHP_SELF}?{$smarty.server.Q UERY_STRING}">
<TR>
<TD>
{$lng.lbl_select_language}:
<SELECT name="sl" onChange="javascript: document.sl_form.submit()">
{section name=ai loop=$all_languages}
<OPTION value="{$all_languages[ai].code}"{if $store_language eq $all_languages[ai].code} selected{/if}>{$all_languages[ai].language}</OPTION>
{/section}
</SELECT>
</TD></TR>
</FORM>
</TABLE>
{else}

{/if}
</TD>
</TR>
<TR>
<TD colspan="2" class="VertMenuBorder">[img]{$ImagesDir}/spacer.gif[/img]</TD>
</TR>
{******** Remove this line to display how much products there are online ****
<TR>
<TD colspan="2" class="NumberOfArticles" align="right">{insert name="productsonline"} {$lng.lbl_products} {if $config.Appearance.show_in_stock eq "Y"}{$lng.lbl_and} {insert name="itemsonline"} {$lng.lbl_items} {/if}{$lng.lbl_online}</TD>
</TR>
**** Remove this line to display how much products there are online ********}
<TR>
<TD colspan="2" valign="middle" height="32">
<TABLE cellspacing="0" cellpadding="0" border="0" width="100%" height="18">
<TR>
<TD>[img]{$ImagesDir}/spacer.gif[/img]</TD>
{if (($main eq 'catalog' && $cat ne '') || $main eq 'product' || ($main eq 'comparison' && $mode eq 'compare_table') || ($main eq 'choosing' && $smarty.get.mode eq 'choose')) && $config.Appearance.enabled_printable_version eq 'Y'}
<TD width="100%" valign="middle" align="right">{include file="printable.tpl"}</TD>
<TD>[img]{$ImagesDir}/spacer.gif[/img]</TD>
{/if}
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
__________________
x-cart 4.0.16v
linux server
Reply With Quote
  #6  
Old 08-08-2005, 08:34 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Might be case sensitive...try replacing this:

{$lng.lbl_Login}

with this:

{$lng.lbl_login}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 08-08-2005, 08:41 AM
 
mmoskva mmoskva is offline
 

eXpert
  
Join Date: Aug 2005
Location: Pennsylvania
Posts: 306
 

Default

Your awesome, thanks
__________________
x-cart 4.0.16v
linux server
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:34 AM.

   

 
X-Cart forums © 2001-2020