Page 1 of 1

[solved] is static page

Posted: Wed Jun 08, 2011 9:22 pm
by seraphyn
Small question, I coudn't find it in the nice book from garvinkicking, too.
Norm way do disable a sidebar is:

Code: Select all

{if $is_single_entry !=true}
            <div id="sidebar_top">
                {if $rightSidebarElements > 0}
                {serendipity_printSidebar side="right"}
{/if}
What's the syntac for staticpage?
{if $is_staticpage !=true} does not work :(
Thanks for the time spending with me
Chris

Re: is static page

Posted: Wed Jun 08, 2011 10:11 pm
by yellowled
seraphyn wrote:What's the syntac for staticpage?
You can test for $staticpage_pagetitle, but I'm not entirely sure whether this variable could be left empty and if the test would work properly if that's the case.

YL

Re: is static page

Posted: Thu Jun 09, 2011 7:59 am
by seraphyn
Thanks yellowled,

I'll try that later this day.
Hope this works, to disable the sidebar on static pages from the theme side.
Chris

Re: is static page

Posted: Fri Jun 10, 2011 3:52 am
by Don Chambers
yeah, I'm thinking {if $staticpage_pagetitle ==''} THIS IS NOT A STATIC PAGE {/if} too...

Re: [solved] is static page

Posted: Fri Jun 10, 2011 10:12 am
by seraphyn
Thanks,

it is:

Code: Select all

        {if $is_single_entry !=true  and $staticpage_pagetitle ==''}
            <div id="sidebar_top">
                {if $rightSidebarElements > 0}
                {serendipity_printSidebar side="right"}
          {/if}
Thanks

EDIT: Hatte falschen Code eingefügt, Sorry