X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Replace text with images? Help with specific locations.. (https://forum.x-cart.com/showthread.php?t=14297)

taltos1 06-01-2005 06:19 AM

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.

TelaFirma 06-01-2005 06:52 AM

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.

taltos1 06-01-2005 07:24 AM

I cannot thank you enough, I spent hours on this. Thank you very much.

TelaFirma 06-01-2005 07:56 AM

your welcome...


All times are GMT -8. The time now is 10:27 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.