Page 1 of 1
LISE - custom template display category name?
Posted: Fri Oct 04, 2019 7:34 am
by rbaby
Hi all,
When I do {$item->fielddefs.type_of_category.value} I just get the ID, how do I display the name?
Thank you.
Re: LISE - custom template display category name?
Posted: Fri Oct 04, 2019 12:31 pm
by Jo Morg
Code: Select all
{LISELoader item='category' identifier='category_id' instance='<ReplaceWithLISEInstanceName>' value=$item->fielddefs.type_of_category.value assign='cat'}
{$cat->title}
As described in LISE help

Re: LISE - custom template display category name?
Posted: Fri Oct 04, 2019 6:56 pm
by rbaby
Jo Morg wrote:Code: Select all
{LISELoader item='category' identifier='category_id' instance='<ReplaceWithLISEInstanceName>' value=$item->fielddefs.type_of_category.value assign='cat'}
{$cat->title}
As described in LISE help

Thank you Jo. I did see that in the sample templates but I get an error. The documentation doesn't quite explain how or where to get the LISELoader plugin and I think that's where my issue is.
Code: Select all
00001: Discrete LISE error: {LISELoader}: Parameter value is not given.! @ /sc_shared/site/domain.com/public/modules/LISE/lib/class.LISELoader.php (72)
Re: LISE - custom template display category name?
Posted: Fri Oct 04, 2019 7:35 pm
by velden
The problem is that there is no value given to the 'value' parameter of LISELoader.
So better check first is that specific fielddef returns something.
Re: LISE - custom template display category name?
Posted: Sat Oct 05, 2019 6:03 pm
by Rolf