Share » Forums » General » I can't live without ez Ad

I can't live without ez Ad

I can't live without ez Ad

Wednesday 25 February 2004 12:28:37 pm - 3 replies

Author Message

Alex Jones

Wednesday 25 February 2004 1:40:46 pm

Actually, you should be able to replicate the pattern with the <i>delimiter</i> functionality of eZ 3. An example is available at http://ez.no/ez_publish/documentation/customization/custom_design/examples/common_template_issues/complex_list But, a quick (and untested) run-down would be something along the lines of:

{let name=Child children=fetch('content','tree',hash(parent_node_id,23,))}
  {section loop=$:children}
	[YOUR ARTICLE INCLUDE CODE]
    {delimiter modulo=3} [YOUR ADVERTISEMENT INCLUDE CODE] {/delimiter}
  {/section}
{/let}

The important part is <i>{delimiter modulo=3} [YOUR ADVERTISEMENT INCLUDE CODE] {/delimiter}</i> which will insert your advertisement on every third (in this case) iteration through the loop. So, you could tweak it to match the pattern you want it to follow.

More examples can be found at http://ez.no/ez_publish/documentation/development/libraries/ez_template/functions/section

Hope this helps,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

scott bell

Thursday 26 February 2004 12:38:36 pm

Alex,

Just a note to say thanks. The worth of ez publish comes thru when you have a deeper knowledge, and these posts from people like you help us greatly.

Alex Jones

Thursday 26 February 2004 1:17:19 pm

You are quite welcome! eZ publish is a great tool, even though, or perhaps because it has a steep learning curve. This is a really good community that has taught me a lot, so I try to give back where I can. :)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu