Hi Jean-Christophe,
Could you please post some template code examples for using module extender objects.
Thanks, Sander
Workshop: M&C Module Factory: template code examples
-
- Forum Members
- Posts: 25
- Joined: Mon Sep 07, 2009 10:33 am
- Location: Bloemendaal, Netherlands
Workshop: M&C Module Factory: template code examples
Last edited by sanderhartveld on Wed Sep 15, 2010 10:13 am, edited 1 time in total.
Re: Workshop: M&C Module Factory: template code examples
First shot ![smiley :-)](./images/smilies/smiley.gif)
Display_details template example with ModuleXtender calls:
Calling ModuleXtender with Page or Category filters:
![smiley :-)](./images/smilies/smiley.gif)
Display_details template example with ModuleXtender calls:
Code: Select all
<h1>{$item->title}</h1>
<a href="{Tasks parent_item=$item->id action="geturl" urlaction="default"}">Tasks</a>
{foreach from=$item->xtended_felist->images item=entry}
<a href="{$entry->url}" target="_new">
<img src="{$entry->resized_images.medium}" />
</a>
{/foreach}
{foreach from=$item->xtended_felist->documents item=entry}
<li><a href="{$entry->url}" target="_new">
{if $entry->title ne ''}{$entry->title}{else}{$entry->filename}{/if}
</a></li>
{/foreach}
<pre>
{$item->xtended_felist|var_dump}
</pre>
Code: Select all
{Projects currentpage=1}
or
{Projects options=2}
Last edited by totophe on Wed Sep 15, 2010 10:10 am, edited 1 time in total.
Re: Workshop: M&C Module Factory: template code examples
Show sub modules:
create a filter "parent_item" on the field parent_item
Then inside the parent module template, call:
create a filter "parent_item" on the field parent_item
Then inside the parent module template, call:
Code: Select all
{NewsletterSubarticles parent_item=$item->getId()}
Re: Workshop: M&C Module Factory: template code examples
For information, the latest version of MC Factory automatically generate those smarty templates so you can play with it.
Re: Workshop: M&C Module Factory: template code examples
I know it's an old topic but I would like to ask an additional question.
I made a module with some fields to add media. One of them is a dropdown for category. Is there a way to call the module so I can only show content in the category chosen with the dropdown?
Like {my_module category="value"} ?
I made a module with some fields to add media. One of them is a dropdown for category. Is there a way to call the module so I can only show content in the category chosen with the dropdown?
Like {my_module category="value"} ?