View Single Post
  #53  
Old 08-08-2013, 05:01 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: NEW xMenus - The Ultimate Menu Manager for X-Cart

USING IMAGES in horizontal menus with a CDN

If anyone is going to use xMenus with a CDN, and you are embedding images in a menu, AND you want the images served from your cdn, you need to edit file:

/skin/common_files/modules/TXS_XMenus/display_menu/menu.H.tpl
(or menu.I.tpl, or menu.V.tpl - but if you are embedding images into a menu, most likely you are on the H menu, right?)

Most likely, your image is being called in the special offer field, like this:
<img src="images/XM/image-name.png" width="170" height="111" />
BUT -- to work with the cdn, you need to do this:

FIND:
Code:
<div class="sub-footer"> {$xm_head->footer_text}
(the images in the menus are in the footer_text)

REPLACE WITH:
Code:
<div class="sub-footer"> {$xm_head->footer_text|replace:'img src="images':'img src="http://cdn.domain.com/images'}
This will not work if you use the menus https... to do that, simply trap for https using {if $smarty.server.HTTPS ne "on"} --

I hope this helps someone (possibly me in my next upgrade cycle).
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote