• 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




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Workshop: M&C Module Factory: template code examples
PostPosted: Wed Sep 15, 2010 9:50 am 
Offline
Forum Members
Forum Members

Joined: Mon Sep 07, 2009 10:33 am
Posts: 25
Location: Bloemendaal, Netherlands
Hi Jean-Christophe,
Could you please post some template code examples for using module extender objects.
Thanks, Sander


Last edited by sanderhartveld on Wed Sep 15, 2010 10:13 am, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Workshop: M&C Module Factory: template code examples
PostPosted: Wed Sep 15, 2010 10:02 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Feb 21, 2007 9:30 am
Posts: 64
Location: Brussels - Belgium
First shot :-)

Display_details template example with ModuleXtender calls:

Code:
<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>


Calling ModuleXtender with Page or Category filters:

Code:
{Projects currentpage=1}
or
{Projects options=2}


Last edited by totophe on Wed Sep 15, 2010 10:10 am, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Workshop: M&C Module Factory: template code examples
PostPosted: Fri Sep 17, 2010 2:59 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Feb 21, 2007 9:30 am
Posts: 64
Location: Brussels - Belgium
Show sub modules:

create a filter "parent_item" on the field parent_item

Then inside the parent module template, call:
Code:
{NewsletterSubarticles parent_item=$item->getId()}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Workshop: M&C Module Factory: template code examples
PostPosted: Tue Sep 21, 2010 8:23 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Feb 21, 2007 9:30 am
Posts: 64
Location: Brussels - Belgium
For information, the latest version of MC Factory automatically generate those smarty templates so you can play with it.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Workshop: M&C Module Factory: template code examples
PostPosted: Tue Sep 21, 2010 3:05 pm 
Offline
Power Poster
Power Poster

Joined: Thu Oct 19, 2006 10:07 am
Posts: 294
Thanks!  :D


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Workshop: M&C Module Factory: template code examples
PostPosted: Sun Jul 03, 2011 12:59 pm 
Offline
Forum Members
Forum Members

Joined: Mon Jul 13, 2009 8:18 pm
Posts: 142
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"} ?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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:  
HostPapa CMS Made Simple hosting