LISE display 1st item in detail mode

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

LISE display 1st item in detail mode

Post 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?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3484
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: LISE display 1st item in detail mode

Post by velden »

Why don't you use the summary action with a pagelimit of 1?
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

Re: LISE display 1st item in detail mode

Post 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
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1630
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: LISE display 1st item in detail mode

Post 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.
Not getting the answer you need? CMSMS support options
johnboyuk1
Forum Members
Forum Members
Posts: 192
Joined: Mon Nov 26, 2018 3:09 pm

Re: LISE display 1st item in detail mode

Post 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 :)
Post Reply

Return to “Modules/Add-Ons”