CMS MADE SIMPLE FORGE

ListItExtended

 

[#9213] link {$item->url) to a template

avatar
Created By: R. Prinsen (erpee)
Date Submitted: 2013-04-30 09:14

Assigned To:
Resolution: None
State: Open
Summary:
link {$item->url) to a template
Detailed Description:
Each item produces a link to a detailpage using the default template for
details.
It would be good if it is possible to use a different detailtemplate for some
items based on content., so the ($item->url) could be linked to a template

E.g. CTLModuleMaker used to have [action=”link”] which worked great.

History

Comments
avatar
Date: 2013-04-30 09:18
Posted By: Tapio Löytty (Stikki)

{ListIt2Instance detailtemplate='mytemplate'} ?
      
avatar
Date: 2013-04-30 09:24
Posted By: R. Prinsen (erpee)

No, that's not what I mean

In my Summary template I want to use ($item->url) and link that url to a
Detaitltemplate other than the standard template.


      
avatar
Date: 2013-04-30 09:28
Posted By: Tapio Löytty (Stikki)

Well isn't that exactly what my tag example does, overwrites default detail
template with inline one?
      
avatar
Date: 2013-04-30 09:32
Posted By: Goran Ilic (uniqu3)

When you call your Summary with {ListIt2MyInstance} use "template" parameter
just like Stikki suggested and please everything is documented in Module Help.

If you want to change Detail template for each or specific links in Summary view
then look at CGExtensions module and module_action_link (i think) that comes
with CGExtensions, for more information about CGExtensions, please read CGE
module help.

Everything else is your own logic in Summary template.
      
avatar
Date: 2013-04-30 09:34
Posted By: R. Prinsen (erpee)

I'm sorry, English is not my native language... so I'm not expressing myself
clearly enough.

An example: InCTLmodulemaker I used this

{foreach from=$itemlist item="item"}
	<li {if $item->is_selected}class="active"{/if}>
<a href="{cms_module module='mod1' action='link' alias=$item->alias
finaltemplate='template1'}"><img border="0" src="image1.png" /></a>
<a href="{cms_module module='mod1' action='link' alias=$item->alias
finaltemplate='template2'}"><img border="0" src="image2.png" /></a>
	{$item->title}</li>
{/foreach}


I don't see how to implement in ($item->url) in the tag {ListIt2Instance
detailtemplate='mytemplate'}
      
avatar
Date: 2013-04-30 10:25
Posted By: Tapio Löytty (Stikki)

Maybe not bad idea, but i don't know how it plays performance wise.

You might wanna test solution that Goran gave you.

We have enough performance problems with queries currently, so we will solve
those first.

I'll leave this open for now, if you found solution using CGExtensions module
link stuff, please post your solution here as well.

Thanks
      
avatar
Date: 2013-04-30 10:50
Posted By: R. Prinsen (erpee)

This works for me (now)

I Took the original Url generated by ($item->url) and teplaced the tag
($item->url) by:

<a
href="http://www.site.com/index.php?mact=ListIt2MYMOD,cntnt01,detail,0&amp;cntnt01item=
{$item->title|cms_escape}
&amp;cntnt01detailtemplate=TEMPLATENAME&amp;cntnt01returnid=65">
{$item->fielddefs.ANYDEFYOUWANT.value|cms_escape}
</a>

You have toc change MYMOD, TEMPLATENAME, ANYDEFYOUWANT but that's obvious. 

Hope you can work this a a future release. Keep up the good works!! ;-)
      
Updates

Updated: 2013-04-30 09:18
resolution_id: => 5