Hallo Zusammen
Ich versuche gerade in der Produktliste drei <li> in einer box darzustellen. Eine solche Lösung gibt es bereits in Oxid, nur kriege ich es nicht hin, dass ganze in listitem_grid.tpl darzustellen.
list.tpl (hier versuche ich aus dem obigen block infos zu holen wie man das macht, scheitere jedoch)
Ich hoffe, dass mir jemand helfen kann.
oxid ce 4.8.1
Beste Grüsse
Avni
Ich versuche gerade in der Produktliste drei <li> in einer box darzustellen. Eine solche Lösung gibt es bereits in Oxid, nur kriege ich es nicht hin, dass ganze in listitem_grid.tpl darzustellen.
HTML Code:
[{if $oView->hasVisibleSubCats()}]
[{assign var="iSubCategoriesCount" value=0}]
[{oxscript include="js/widgets/oxequalizer.js" priority=10 }]
[{oxscript add="$(function(){oxEqualizer.equalHeight($( '.subcatList li .content' ));});"}]
<ul class="subcatList clear">
<li>
[{foreach from=$oView->getSubCatList() item=category name=MoreSubCat}]
[{ if $category->getContentCats() }]
[{foreach from=$category->getContentCats() item=ocont name=MoreCms}]
[{assign var="iSubCategoriesCount" value=$iSubCategoriesCount+1}]
<div class="box">
<h3>
<a id="moreSubCms_[{$smarty.foreach.MoreSubCat.iteration}]_[{$smarty.foreach.MoreCms.iteration}]" href="[{$ocont->getLink()}]">[{ $ocont->oxcontents__oxtitle->value }]</a>
</h3>
<ul class="content"></ul>
</div>
[{/foreach}]
[{/if }]
[{if $iSubCategoriesCount%4 == 0}]
</li>
<li>
[{/if}]
[{if $category->getIsVisible()}]
[{assign var="iSubCategoriesCount" value=$iSubCategoriesCount+1}]
[{assign var="iconUrl" value=$category->getIconUrl()}]
<div class="box">
<h3>
<a id="moreSubCat_[{$smarty.foreach.MoreSubCat.iteration}]" href="[{ $category->getLink() }]">
[{$category->oxcategories__oxtitle->value }][{ if $oView->showCategoryArticlesCount() && ($category->getNrOfArticles() > 0) }] ([{ $category->getNrOfArticles() }])[{/if}]
</a>
</h3>
[{if $category->getHasVisibleSubCats()}]
<ul class="content">
[{if $iconUrl}]
<li class="subcatPic">
<a href="[{ $category->getLink() }]">
<img src="[{$category->getIconUrl() }]" alt="[{ $category->oxcategories__oxtitle->value }]">
</a>
</li>
[{/if}]
[{foreach from=$category->getSubCats() item=subcategory}]
[{if $subcategory->getIsVisible() }]
[{ foreach from=$subcategory->getContentCats() item=ocont name=MoreCms}]
<li>
<a href="[{$ocont->getLink()}]"><strong>[{ $ocont->oxcontents__oxtitle->value }]</strong></a>
</li>
[{/foreach }]
<li>
<a href="[{ $subcategory->getLink() }]">
<strong>[{ $subcategory->oxcategories__oxtitle->value }]</strong>[{ if $oView->showCategoryArticlesCount() && ($subcategory->getNrOfArticles() > 0) }] ([{ $subcategory->getNrOfArticles() }])[{/if}]
</a>
</li>
[{/if}]
[{/foreach}]
</ul>
[{else}]
<div class="content catPicOnly">
<div class="subcatPic">
[{if $iconUrl}]
<a href="[{ $category->getLink() }]">
<img src="[{$category->getIconUrl() }]" alt="[{ $category->oxcategories__oxtitle->value }]">
</a>
[{/if}]
</div>
</div>
[{/if}]
</div>
[{/if}]
[{if $iSubCategoriesCount%4 == 0}]
</li>
<li>
[{/if}]
[{/foreach}]
</li>
</ul>
[{/if}]
list.tpl (hier versuche ich aus dem obigen block infos zu holen wie man das macht, scheitere jedoch)
HTML Code:
[{if $products|@count gt 0}]
<ul class="[{$type}]View clear" id="[{$listId}]">
[{assign var="currency" value=$oView->getActCurrency() }]
[{foreach from=$products item=_product name=productlist}]
[{assign var="_sTestId" value=$listId|cat:"_"|cat:$smarty.foreach.productlist.iteration}]
<li class="productData">
[{oxid_include_widget cl="oxwArticleBox" _parent=$oView->getClassName() nocookie=1 _navurlparams=$oViewConf->getNavUrlParams() iLinkType=$_product->getLinkType() _object=$_product anid=$_product->getId() sWidgetType=product sListType=listitem_$type iIndex=$_sTestId blDisableToCart=$blDisableToCart isVatIncluded=$oView->isVatIncluded() showMainLink=$showMainLink recommid=$recommid owishid=$owishid toBasketFunction=$toBasketFunction removeFunction=$removeFunction altproduct=$altproduct inlist=$_product->isInList() skipESIforUser=1}]
</li>
[{if ($type eq "infogrid" AND ($smarty.foreach.productlist.last) AND ($smarty.foreach.productlist.iteration % 2 != 0 )) }]
<li class="productData"></li>
[{/if}]
[{/foreach}]
</ul>
[{/if}]
oxid ce 4.8.1
Beste Grüsse
Avni