I'm working on a template for a blog which will have very few entries, probably not more than one per month. So our traditional archives page (archives/summary) doesn't make much sense. Then again, I'd rather have an archive page generated automagically than manually build one using a static page.
Any chance I can tweak the entries_archives.tpl to emit a list of entries per year?
YL
Different archives logic
Re: Different archives logic
Hi YL
This little tweek helped me in these situation.
Maybe its not actually want you want, but it could be a hint:
entries_archives.tpl:
Ian
This little tweek helped me in these situation.
Maybe its not actually want you want, but it could be a hint:
entries_archives.tpl:
Code: Select all
{if $month.entry_count > 0}
<ul class="archives_row {cycle values='archives_row_odd,archives_row_even'}">
.................................
</ul>
{/if}
Re: Different archives logic
No, I'd basically like to have the list of entries as it is not emitted by entries_summary.tpl, only within the yearly context of the entries_archives.tpl.Timbalu wrote:Maybe its not actually want you want
YL
Re: Different archives logic
what about working with serendipity_event_customarchive.php?
Read thread http://board.s9y.org/viewtopic.php?f=10&t=16841
mabe this will point in a better direction...
Ian
Read thread http://board.s9y.org/viewtopic.php?f=10&t=16841
mabe this will point in a better direction...
Ian
Re: Different archives logic
Jeez. This is actually easy-peasy if you think about it.
entries_archives.tpl:
Combine this with a template for the fetchPrintEntries call to customize the article output (i.e. items of an unordered list), and you're done.
YL
entries_archives.tpl:
Code: Select all
{foreach from=$archives item="archive"}
<div class="archive-year">
<h3>{$archive.year}</h3>
{serendipity_fetchPrintEntries range="$archive.year" full=false fetchDrafts=false noSticky=true}
</div>
{/foreach}
YL