Page 1 of 1

LISE display 1st item in detail mode

Posted: Thu Sep 14, 2023 2:47 pm
by johnboyuk1
I need to be able to display the first item in my LISE module in detail mode, the catch being that I want to show the first item from within a category.

So for instance

Code: Select all

{LISEtest1 action=detail item=1}
Would show me the overall first item in detail mode

Code: Select all

{LISEtest1 action=detail item=1 category="test"}
Obviously wouldnt work as item 1 is still item 1 whatever category it is ...

Any idea how to select the first item from within the category?

Re: LISE display 1st item in detail mode

Posted: Thu Sep 14, 2023 5:40 pm
by velden
Why don't you use the summary action with a pagelimit of 1?

Re: LISE display 1st item in detail mode

Posted: Fri Sep 15, 2023 8:00 am
by johnboyuk1
Yes, that was going to be the next thing to try! basically copying my detail template as a summary template ...

Just checking there wasnt a simple way of doing it from the tag itself

thanks

Re: LISE display 1st item in detail mode

Posted: Fri Sep 15, 2023 3:17 pm
by DIGI3
Using that method, you could just use a summary template to call the detail template of the first item, so you don't have to maintain two templates. Something like {LISEinstance item=$item->alias action=detail} as your entire summary template. There's probably more efficient ways using UDTs but that's the simplest.

Re: LISE display 1st item in detail mode

Posted: Sun Sep 17, 2023 10:25 am
by johnboyuk1
ok great, I'll try that as I realised I can't use a summary template as I have a bit of code i need to use that provides previous/next links in my detail template that doesnt work in a summary template :)