This is the code I'm using:
Code: Select all
{ListIt2Loader item='category' force_array=1 instance='ListIt2Portfolio' value=$item->categories assign='cats'}
<li class="item" data-id="id-{$smarty.foreach.count.iteration}" data-type="{$cats|implode:','}">
Using |print_r to view the contents of the $cats array I get this:
Code: Select all
Array
(
[4] => ListIt2Category Object
(
[category_id] => 4
[alias] => style-guides
[name] => Style Guides
[description] =>
[active] => 1
[position] => 1
[parent_id] => -1
[hierarchy] => 00001 etc.