I have a problem with a 2 column design
I have create a entries2col.tpl file like this:
Code: Select all
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
{foreach from=$entries item="dategroup" name=LOOP1}
{foreach from=$dategroup.entries item="entry" name=LOOP2}
<div class="post indexpost {if $smarty.foreach.LOOP1.iteration is even}evenpost{else}oddpost{/if}" >
<div class="top"></div>
<div class="mid">
<div class="title">
<a class="text2" href="{foreach from=$entry.categories item="entry_category"}{$entry_category.category_link}{/foreach}">{foreach from=$entry.categories item="entry_category"}{$entry_category.category_name|@escape}{/foreach}</a>
<h5> <a class="title" href="{$entry.link}" rel="bookmark">{$entry.title|@default:$entry.id}»</a></h5>
<p>By <a href="http://www." title="Posts by admin">admin</a> on December 18, 2008</span></p>
</div>
<div class="entry">
{if $entry.properties.ep_MimboImage != ''} <img class="header" alt="Permanent link: {$entry.title}" src="{$entry.properties.ep_MimboImage}" />{/if}
<div class="text">
<p>{$entry.body|strip_tags|truncate:100:" ..."}<a class="text" href="{$entry.link}" rel="bookmark"> [mehr..]</a></p>
</div>
</div>
</div>
<div class="bot"></div>
</div>
{/foreach}
{/foreach}
{serendipity_hookPlugin hook="entries_footer"}
in my index.tpl file I call the entries2col.tpl with :
Code: Select all
{serendipity_fetchPrintEntries category=$template_option.catx3 full=true fetchDrafts=false noSticky=true limit="0,6" template="entries_2Cols.tpl"}
will decide if the class is evenpost or oddpost
This works as long as I have only one entry with the same date. I guess I have to query the LOOP2 but I do not know how?
Thanks