[Typo3-shop] to browse categories in FE
Sami Ben-yahia
sittinggoat at hotmail.com
Tue Dec 6 13:54:10 CET 2005
Hi,
I just released the first public version of nsb_cat2menu (not so basic categories to menu), an extension that displays a category
table as a FE menu.
To use it with tt_products/mbi_products_categories there's a slight modification to do in class.tx_ttproducts_list_view.php (version
2.3.11)
line 89 in the printView method
...
$where='';
//---
if(isset($this->pibase->piVars['cat'])){
$where .= 'AND category IN ('.implode(",",t3lib_div::intExplode(',', $this->pibase->piVars['cat'])).')';
}
//---
if ($theCode=='SEARCH') {
...
a typoscript example :
lib.nsbcat2menu = HMENU
lib.nsbcat2menu.special = userfunction
lib.nsbcat2menu.special.userFunc = tx_nsbcat2menu_pi1->main
lib.nsbcat2menu.special.catList=5
#the uid of my root category, you can have more than one root exemple(catList=5,6)
lib.nsbcat2menu.special.pidlist=4
#the uid of the storage folder where my categories are
lib.nsbcat2menu.special.catTable=tt_products_cat
lib.nsbcat2menu.special.parentEntry=parent_category
lib.nsbcat2menu.special.extTrigger=tx_ttproducts_pi1
lib.nsbcat2menu.special.varCat=cat
lib.nsbcat2menu.special.recSel = 1
#if true selecting a parent category selects all childs
lib.nsbcat2menu.1 = TMENU
lib.nsbcat2menu.1 {
noBlur = 1
# Normal state properties
NO.allWrap = <div class="menu1-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-act"> -> | </div>
}
lib.nsbcat2menu.2 = TMENU
lib.nsbcat2menu.2 < lib.nsbcat2menu.1
lib.nsbcat2menu.3 = TMENU
lib.nsbcat2menu.3 < lib.nsbcat2menu.1
lib.nsbcat2menu.4 = TMENU
lib.nsbcat2menu.4 < lib.nsbcat2menu.1
I'm open to any feedback and suggestions, there is no roadmap but if tou look ine the code you'll see planing features.
It would be great if you can implement this in the tt_products extension but there is no hurry (it's still in alpha state)
Sami Ben-yahia
More information about the TYPO3-project-tt-products
mailing list