Hi,
Happy new year !
This is my goal :
I want to show for a category all subcategories and for each subcategory only leading articles (4 to 8 ).
Subcategories should be stacked in lines and leading articles inside each subcat should be in columns (4).
What is the best way to do that ?
I have no problem with html and css and i want to manage this in a custom template to make different display for each subcategory.
So i have already created the custom template and assigned it to my main category.
But now i face the subcategory problem and as there is tons of code it is a bit complex ...
Some code to cycle thru subcats then cycle thru leading articles ?
In tmpl_common/category_subcategories.php i see we can cycle subcats with :
Code:
foreach ($this->categories as $sub) {
But after that how to cycle thru leading articles of the current sub-category ?
I would need something like :
Code:
foreach ($sub->leadings as $item) {
echo $item->title;
echo $item->image;
}
But i guess i need some code to get leading items in each sub and also force some fields rendering (image and files).
Cheers