Ik heb 3 menu's met elk 3 submenu's. Elk submenu heeft zijn eigen afbeelding. Wat ik wil is dat elk submenu zijn afbeelding ophaald vanuit een andere locatie.
De theorie is is dat 'background-image' kijkt welke categorie wordt aangeroepen en dan de bijbehoorende afbeelding ophaalt.
Na veel trial/error ben ik niet verder gekomen. Ik hoop dat jullie mij de juiste richting op kunnen duwen.
Wat ik heb ziet er zo uit:
{if $aProductCategorySubCategories|@count > 0}
<style type="text/css">
.customlayout-subcategory-container {
width:100%;
padding:10px;
}
.customlayout-subcategory-item {
float:left;
display:block;
background-image: url(<?php echo $ProductCategorySubCategory;?>);
padding:5px;
margin-right:10px;
margin-bottom:10px;
border:1px solid #ccc;
width: 260px;
height: 185px;
text-decoration:none;}
.customlayout-subcategory-item:hover {
background:#f1c40f;
}
</style>
<div class="customlayout-subcategory-container">
{section loop=$aProductCategorySubCategories name=i}
{$oProductCategorySubCategory = $aProductCategorySubCategories[i]}
<a href="{$oProductCategorySubCategory->Deeplink}" class="customlayout-subcategory-item">
{$oProductCategorySubCategory->Name}
</a>
{/section}
</div>
{/if}De code resulteert in:
