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

Replace text with images? Help with specific locations..

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

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default Replace text with images? Help with specific locations..

Hello,
I am very close to finishing the design of my store, but a few things are eluding me. I would like to replace the side cart modules name (Categories, Your Cart, Manufacturers etc) from the actual text to an image. Now, I know that menu.tpl controls how all the side blocks look and each ind. module is also controlled by their respective .tpl. I was able to add images where I want them by editing each respective .tpl and then commenting out
{* $menu_title *} in menu.tpl, but then I also lost the side block text in the Admin area.

What I would like to know is if I can edit the menu.tpl so I can make it call images instead of text with the { $menu_title } is there is an image, but if not then just draw the normal text? Is this possible? Am I making it more complicated then it needs to be?

Thanks so much.
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
  #2  
Old 06-01-2005, 06:52 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

Try this, instead of editing the menu.tpl file change the way that you call it from other templates. For example, in your /customer/home.tpl file there are a few calls to templates that use the menu.tpl file. Lets take for example the Users Online module.

Code:
[color=olive]{if $active_modules.Users_online ne ""} { include file="modules/Users_online/menu_users_online.tpl" }[/color]

The content that the file above produces is inserted into the menu.tpl file with this line at the bottom of the file:

Code:
{ include file="menu.tpl" dingbats="dingbats_authentification.gif" menu_title=$lng.lbl_users_online menu_content=$smarty.capture.menu }

If you would like to use an image as the title just pass that code as the title variable. Something like this:

Code:
{ include file="menu.tpl" dingbats="dingbats_authentification.gif" menu_title="<img border=\"0\" src=\"$ImagesDir/my_image.gif\" alt=\"$alt\" width=\"200\" height=\"15\">" menu_content=$smarty.capture.menu }

...of course changing the image name to your image, and the width and height to your width and height.
Reply With Quote
  #3  
Old 06-01-2005, 07:24 AM
 
taltos1 taltos1 is offline
 

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default

I cannot thank you enough, I spent hours on this. Thank you very much.
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
  #4  
Old 06-01-2005, 07:56 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

your welcome...
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 10:33 AM.

   

 
X-Cart forums © 2001-2020