Static pages plugin uses entries.tpl? WTF?

Creating and modifying plugins.
Post Reply
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Static pages plugin uses entries.tpl? WTF?

Post 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
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

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

Post 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}
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

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

Post 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
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

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

Post 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.
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

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

Post 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
Post Reply