Help please.
Can anyone give me a hint as to how I might remove the sidebar only with the static pages?
Thanks in advance.
BC
Remove sidebar in staticpages?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Remove sidebar in staticpages?
Hi!
Is there a specific reason why you want such a blog page to be a static page? You could simply upload a HTML file with your layout in that case, as it wouldn't really require the blog layout in this case?
You can only achieve that by editing your sidebar.tpl template file and inserting a Smarty-Check to hide the output, if you are on the specific staticpage:
Regards,
GArvin
Is there a specific reason why you want such a blog page to be a static page? You could simply upload a HTML file with your layout in that case, as it wouldn't really require the blog layout in this case?
You can only achieve that by editing your sidebar.tpl template file and inserting a Smarty-Check to hide the output, if you are on the specific staticpage:
Code: Select all
{if $staticpage_pagetitle != 'your_specific_staticpage'}
...here all the code of sidebar.tpl...
{/if}
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
bdconnolly
- Regular
- Posts: 140
- Joined: Tue Apr 04, 2006 9:37 pm
Yes... I could do it by html but I already have 7 static pages and to redo all would be a pain.
With regard to the code you recommend... where exactly? Also note, I want to hide the sidebar in ALL instances not just a specific page.
With regard to the code you recommend... where exactly? Also note, I want to hide the sidebar in ALL instances not just a specific page.
Code: Select all
{if $is_raw_mode}
<div id="serendipity{$pluginside}SideBar">
{/if}
{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title != ""}<h3 class="serendipitySideBarTitle {$item.class}">{$item.title}</h3>{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
</div>
{/foreach}
{if $is_raw_mode}
</div>
{/if}-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Replace staticpage_title_1, staticpage_title_2 etcc. with the names of your pages.
Regards,
Garvin
Code: Select all
{if $staticpage_plugintitle == 'staticpage_title_1' OR $staticpage_plugintitle == 'staticpage_title_2' or $staticpage_plugintitle == 'staticpage_title_2'}
<!-- do nothing -->
{else}
{if $is_raw_mode}
<div id="serendipity{$pluginside}SideBar">
{/if}
{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem container_{$item.class}">
{if $item.title != ""}<h3 class="serendipitySideBarTitle {$item.class}">{$item.title}</h3>{/if}
<div class="serendipitySideBarContent">{$item.content}</div>
</div>
{/foreach}
{if $is_raw_mode}
</div>
{/if}
{/if}Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
bdconnolly
- Regular
- Posts: 140
- Joined: Tue Apr 04, 2006 9:37 pm
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
The right variable is $staticpage_pagetitle, sorry.
Regards,
Garvin
The right variable is $staticpage_pagetitle, sorry.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
bdconnolly
- Regular
- Posts: 140
- Joined: Tue Apr 04, 2006 9:37 pm
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
in your index.tpl there must be something like
perhaps in a div or a tabel-element (depends on your template).
Do this into the if-clause.
And BTW, @Garvin: Isn't there a variable like "is_staticpage"?)
Code: Select all
{serendipity_printSidebar side="right"}Do this into the if-clause.
And BTW, @Garvin: Isn't there a variable like "is_staticpage"?)
Ciao, Stephan
-
bdconnolly
- Regular
- Posts: 140
- Joined: Tue Apr 04, 2006 9:37 pm
yep, but that still leaves the "content" with the same id.
This works:
This works:
Code: Select all
<table id="mainpane">
<tr>
{if $leftSidebarElements > 0}
<td id="serendipityLeftSideBar" valign="top">{serendipity_printSidebar side="left"}</td>
{/if}
{if $staticpage_pagetitle == 'About'}
<td id="staticpage" valign="top">{$CONTENT}</td>
{else}
<td id="content" valign="top">{$CONTENT}</td>
{/if}
{if $staticpage_pagetitle == 'About'}
<!-- do nothing -->
{else}
{if $rightSidebarElements > 0}
<td id="serendipityRightSideBar" valign="top">{serendipity_printSidebar side="right"}</td>
{/if}
{/if}
</tr>
</table>