Page 1 of 1

Entry Date div not being generated

Posted: Sun Jul 13, 2008 4:46 pm
by sonichouse
When going to pages two onwards the second entry does not have

Code: Select all

<div class="hentry serendipity_Entry_Date">
I have based my theme on buletproof, but I cannot work out why this is happening.

This can be seen here.

Re: Entry Date div not being generated

Posted: Mon Jul 14, 2008 10:38 am
by garvinhicking
Hi!

Actually, this is intentional. The date for entries that are posted on the same day are only emitted once in default s9y themes.

If you want that date for each entry, even resulting in duplicate dates, you must shuffle the {foreach} loops inside the entries.tpl file around. Once you look at that loop, you should immediately see why the date is only showed once, because the <div> is outputted inside the outer loop, not the inner loop.

Regards,
Garvin

Posted: Mon Jul 14, 2008 4:24 pm
by judebert
So, by "shuffle the {foreach} loops", Garvin means to move the <div> containing the date from the outer loop to an appropriate location in the inner loop.

And by "appropriate location", I mean the spot you want the date to appear in the HTML. When looking at Smarty, you see almost the HTML displayed for one entry; the extra {foreach} and other Smarty tags simply cause things to be duplicated for extra entries, with the right data substituted (like name, contents, date, and so on).

If you have any specific questions on the Smarty, we'll be here to help.

Posted: Mon Jul 14, 2008 10:27 pm
by sonichouse
Thanks guys for the explanation - all is clear now :lol:

I was adding the push-pin to the date - not the title.

Moving the graphic to the title has resolved my issue.

Cheers.