ListiIt2 - display category name
Re: ListiIt2 - display category name
It comes with some kind of category thing but it has to be activated in the main listit2 module admin under extensions and then do a def scan or some such silly stuff like that, it says this in the module somewhere...
Re: ListiIt2 - display category name
In Listit2 categories are added by adding the Field Definition called "Categories". A new tab will appear, where you can add categories. This Field Definition can have a custom alias, calling it in a template is done like this:Obviously replace "yourcategoryalias" by the alias you gave it.
Code: Select all
<div>{$item->yourcategoryalias}</div>
Re: ListiIt2 - display category name
http://forum.cmsmadesimple.org/viewtopi ... =7&t=68991
Though note the imformation could be a little out-dated. Along development of LI2 things changed possibly.
IIRC ListIt2Loader is a plugin that comes with installation of LI2 module itself.
Though note the imformation could be a little out-dated. Along development of LI2 things changed possibly.
IIRC ListIt2Loader is a plugin that comes with installation of LI2 module itself.
Re: ListiIt2 - display category name
What version of cmsms and LI2 are we talking about?
Re: ListiIt2 - display category name
Just tested and the default summary template just displays category NAME out of the box.
Re: ListiIt2 - display category name
You can't do it that way because the item object just hold the identifier of the category.
Check the default summary template that comes with an LI2 instance. It's in there.
Check the default summary template that comes with an LI2 instance. It's in there.
Re: ListiIt2 - display category name
I'm using the LISE (fork of LI2) and I'm also want to have the alias from the category id of the field definition category.
The output is the category id, but I would like to have the alias of that...
Anybody know how to do this?
Thank you
Kind regards
Peter
The output is the category id, but I would like to have the alias of that...
Anybody know how to do this?
Thank you
Kind regards
Peter
Re: ListiIt2 - display category name
There's some code in the sample (detail) template:
$fielddef.value might need to be replaced with the part that now gives you the Category id(s).
Note that this will return the titles, not the aliases
Code: Select all
{LISELoader item='category' force_array=1 value=$fielddef.value assign='cats'}
Category: {$cats|implode:','}
Note that this will return the titles, not the aliases