Thread: lists in .tpl
View Single Post
  #2  
Old 08-18-2014, 06:35 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: lists in .tpl

You have two ways to achieve it:

1) Via template
- Enable Custom Skin module or create your own one (I believe, you already created one) that registers skins
- Create the template main.header.tpl that will replace default one, so its code will be as follows:

Code:
<div id="header-area"> {* commenting out mini-cart widget <div class="desctop_header"> <list name="layout.header" /> </div> *} <list name="layout.header.mobile" /> </div>

This template will sit in the skins/custom_skin/default/en/layout/ folder if you are using Custom Skin module.

If you are using your own module, it will sit in the <PATH-TO-YOUR-CUSTOMER-SKIN>/en/layout/main.header.tpl

Finally, the whole process is described here:
http://kb.x-cart.com/pages/viewpage.action?pageId=7504837#Webinar2-10Apr2014-DesignchangesinX-Cart5(Custom...stomSkinmodule
http://kb.x-cart.com/pages/viewpage.action?pageId=7504837#Webinar2-10Apr2014-DesignchangesinX-Cart5(Custom...ridingtemplate

2) Via PHP code

This process is described here:
http://kb.x-cart.com/pages/viewpage.action?pageId=7504837#Webinar2-10Apr2014-DesignchangesinX-Cart5(Custom...-2.2.ByPHPcode

In this case, you need to create runBuildCacheHandler() method in your Main.php file and call there something like:

PHP Code:
public static function runBuildCacheHandler()
    {
        
parent::runBuildCacheHandler();
 
        \
XLite\Core\Layout::getInstance()->removeTemplateFromLists('layout/main.header.tpl');
    } 

Please, let me know if it helps.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote