LISE - detail page with multiple LISE instances

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

LISE - detail page with multiple LISE instances

Post by rbaby »

I'm hoping for some guidance on the best way to accomplish this. I have 3 LISE:

* LISEStore - list of stores
* LISEEvent - events with a Field Definition: LISE Instance Item of Store so I can optionally associate an event to store(s)
* LISEOffer - offers with a Field Definition: LISE Instance Item of Store so I can optionally associate an event to store(s)

I'd like to create a store detail page that pulls any events and offers associated to the store but am struggling to do the best way to do so with their own respective detail templates.

Thank you in advance for your help.
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: LISE - detail page with multiple LISE instances

Post by velden »

I think you should something like this inside the LISEStore detail template:

Code: Select all

{LISEEvent search_store=$item->alias template_summary=...}
{LISEOffer search_store=$item->alias template_summary=...}
search_store --> assumes your field definition is named 'store'. If not change the parameter accordingly.
(optional) search_*="" - Search a particular field. You can use 'title' or the alias of a field definition, e.g. search_title. Can be combined with fulltext search. Multiple search_* params can be combined.
Further, if I recall correctly, LISE may overwrite your '$item' variable when calling another instance.

This might give problems when calling the second (LISEOffer) instance because the alias may the one of the last LISEEvent item.

Solve this by storing the LISEStore item in another variable and use that variable when you need a value from your store's fielddef(s):

Code: Select all

...
{$store_item=$item}
{LISEEvent search_store=$store_item->alias template_summary=...}
{LISEOffer search_store=$store_item->alias template_summary=...}
...
<h1>{$store_item->title}</h1>
...
I'd like to create a store detail page that pulls any events and offers associated to the store but am struggling to do the best way to do so with their own respective detail templates.
I presume you mean summary template as this action is a summary action to get zero or more Events and Offers.
rbaby
Forum Members
Forum Members
Posts: 144
Joined: Thu Feb 07, 2008 10:28 pm

Re: LISE - detail page with multiple LISE instances

Post by rbaby »

Thank you velden, yes I meant summary template.
Further, if I recall correctly, LISE may overwrite your '$item' variable when calling another instance.
This is the issue that I was running into so it wasn't rendering correctly. I will try assigning the variable. Dank je, I appreciate your help!
Post Reply

Return to “Modules/Add-Ons”