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

Where can i edit Left Category menu

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 03-12-2014, 04:00 PM
 
cyberastore cyberastore is offline
 

Newbie
  
Join Date: Mar 2014
Posts: 3
 

Default Where can i edit Left Category menu

Top menu has its own "top_menu.tpl" file but none for the side menu..
Where can i find/edit the Left Category menu?...
__________________
X-Cart 5 Business
none
Reply With Quote
  #2  
Old 03-13-2014, 05:34 AM
 
cyberastore cyberastore is offline
 

Newbie
  
Join Date: Mar 2014
Posts: 3
 

Default Re: Where can i edit Left Category menu

bump.. i would like to replace it with a custom menu...
__________________
X-Cart 5 Business
none
Reply With Quote
  #3  
Old 03-15-2014, 01:56 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Where can i edit Left Category menu

It depends on what you want to achieve.

\XLite\View\TopCategories is the widget that renders the Categories menu. Depending on the menu mode, it uses different templates from the "[xc5]/skins/default/en/categories/[mode]/" directories.

However, I guess you just want add another block to the side bar. If so, you should create either a new template, or a new widget (the PHP class) and add the
Code:
@ListChild (list="sidebar.first", zone="customer", weight="100")
tag to comments to the file (weight determines the position of the block).

You can read more about the @ListChild tag here:
https://x-cart.atlassian.net/wiki/display/XDD/Templater+lists

"sidebar.first" is the "list" for the left side bar.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #4  
Old 03-17-2014, 07:13 AM
 
cyberastore cyberastore is offline
 

Newbie
  
Join Date: Mar 2014
Posts: 3
 

Default Re: Where can i edit Left Category menu

thanks for the quick reply.. is there a way to pull the sub-categories? can someone please help me with this code..




Code:
<div id="ddsidemenubar" class="markermenu"> <ul> {foreach:getCategories(),idx,_category} <li> <a rel="{_category.getName()}" href="{buildURL(#category#,##,_ARRAY_(#category_id#^_category.category_id))}" {displayLinkClass(idx,_categoryArraySize,_category):h}>{_category.getName()}</a> <!--Submenu of category --> <ul id="{_category.getName()}" class="ddsubmenustyle blackwhite"> <li><a href="sub menu link here">sub menu NAME here 1</a></li> <li><a href="sub menu link here">sub menu NAME here 2</a></li> </ul> </li> {end:}
__________________
X-Cart 5 Business
none
Reply With Quote
  #5  
Old 03-19-2014, 05:15 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Where can i edit Left Category menu

Actually, it already can do this

You just need to switch the widget mode to "tree" by creating a custom module and decorating the "defineWidgetParams()" method in the \XLite\View\TopCategories class as follows:

PHP Code:
/**
     * Define widget parameters
     *
     * @return void
     */
    
protected function defineWidgetParams()
    {
        
parent::defineWidgetParams();

        
$this->widgetParams[static::PARAM_DISPLAY_MODE]->setValue(static::DISPLAY_MODE_TREE);
    } 

This should make the widget to generate HTML for the full categories tree (however, out of the box there are no CSS classes to display the tree properly, so you should add them yourself in your module).
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions

Last edited by qualiteam : 03-19-2014 at 05:17 AM.
Reply With Quote

The following user thanks qualiteam for this useful post:
tony_sologubov (03-19-2014)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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:09 AM.

   

 
X-Cart forums © 2001-2020