• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: LISE - detail page with multiple LISE instances
PostPosted: Tue Jul 23, 2019 8:09 am 
Offline
Forum Members
Forum Members

Joined: Thu Feb 07, 2008 10:28 pm
Posts: 144
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE - detail page with multiple LISE instances
PostPosted: Tue Jul 23, 2019 11:48 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3156
Location: The Netherlands
I think you should something like this inside the LISEStore detail template:

\$1:
{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.

\$1:
(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):

\$1:
...
{$store_item=$item}
{LISEEvent search_store=$store_item->alias template_summary=...}
{LISEOffer search_store=$store_item->alias template_summary=...}
...
<h1>{$store_item->title}</h1>
...


\$1:
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: LISE - detail page with multiple LISE instances
PostPosted: Tue Jul 23, 2019 7:38 pm 
Offline
Forum Members
Forum Members

Joined: Thu Feb 07, 2008 10:28 pm
Posts: 144
Thank you velden, yes I meant summary template.

\$1:
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!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting