Page 1 of 1

Static pages plugin uses entries.tpl? WTF?

Posted: Thu Oct 15, 2009 3:35 pm
by yellowled
Okay, so in case you were wondering why I asked about all this {serendipity_hookPlugin hook="entries_footer"} stuff in the first place, here's the reason why.

I'm working on a new template for my blog. My entries.tpl uses the pagination code Jude and I developed some time ago. This is only used in the entries.tpl, yet I get an empty <div class="pagination"></div> on static pages!

How's that possible? And is there a way to get rid of it? (.pagination is styled in this template, so the empty div is not only unnecessary but also noticable on screen)

(Yes, I know how to suppress it using CSS/display: none; -- but I'd much rather weed it out completely.)

YL

Re: Static pages plugin uses entries.tpl? WTF?

Posted: Thu Oct 15, 2009 4:26 pm
by Don Chambers
Instead of display:none, how about wrapping your entire entries.tpl in this:

Code: Select all

{if $staticpage_pagetitle ==''} {* proceed only if this is not a static page *}
    .....
{/if}

Re: Static pages plugin uses entries.tpl? WTF?

Posted: Thu Oct 15, 2009 4:34 pm
by yellowled
Don Chambers wrote:

Code: Select all

{if $staticpage_pagetitle ==''} {* proceed only if this is not a static page *}
    .....
{/if}
See, this is the kind of stuff I never stumble upon on my own. Kind of like I'm wearing blinders or something. Jeez.

Tested ... aaand it works. Thanks.

(I'd still like to know the why here, though.)

YL

Re: Static pages plugin uses entries.tpl? WTF?

Posted: Thu Oct 15, 2009 4:38 pm
by Don Chambers
Yeah, I stumbled on this same issue with Kinetic... sometimes I think Garvin planted little bumps in the code here and there just to see if we could find them! :lol:

I too would like to know why entries.tpl is called at all for static pages, since it has its own smarty templates. Would not be surprised to learn that is some kind of leftover to when static pages were first developed.

Re: Static pages plugin uses entries.tpl? WTF?

Posted: Thu Oct 15, 2009 4:40 pm
by yellowled
Don Chambers wrote:Yeah, I stumbled on this same issue with Kinetic... sometimes I think Garvin planted little bumps in the code here and there just to see if we could find them! :lol:
Not bumps. Hooks. At least that's what I'd put my money on. :)

YL