Go Back   Pligg CMS Forum > Pligg Development > Pligg Templates > Template Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-07-2007, 07:19 PM
New Pligger
 
Join Date: Apr 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
How to Remove the sidebar on certain pages.

I would like to remove the sidebar on my comments page. Anyone have any advice on how to accomplish this?

All pages are made from a plethora of .tpl files. So I am unsure how to make my template not have certain .tpl files on different pages.

Thanks!
Reply With Quote
  #2 (permalink)  
Old 09-07-2007, 11:37 PM
dollars5's Avatar
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,154
Thanks: 290
Thanked 266 Times in 177 Posts
you should edit pligg.tpl - there already you have an example - where the sidebar is hidden in edit pages - check it and add the pages you want to hide it.
Reply With Quote
  #3 (permalink)  
Old 09-09-2007, 06:32 PM
New Pligger
 
Join Date: Apr 2007
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
With dollars5 help and a little research i was able to solve this. I will explain for those other code handicapped people out there. I wanted to remove the sidebar from the user and comments page. Here is the line of code I used.

{if $pagename neq "story" && $pagename neq "user"}{include file=$tpl_right_sidebar.".tpl"}{/if}

The double && symbol is what took me the longest to figure out -_-
Reply With Quote
  #4 (permalink)  
Old 09-20-2007, 12:52 PM
Constant Pligger
Pligg Version: 9.7
Pligg Template: Yget
 
Join Date: Nov 2006
Posts: 160
Thanks: 26
Thanked 1 Time in 1 Post
so does this mean that if I use the following code, it will show the sidebar 'only' on the Live page? I'm using 9.7 though.
Quote:
{if $pagename neq "live"}{include file=$tpl_right_sidebar.".tpl"}{/if}
Reply With Quote
  #5 (permalink)  
Old 09-22-2007, 09:53 AM
spartacus's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Removing Sidebar

I have used this code to successfully remove the side bar in all of my admin pages, but it will not work for any pages associated with modules, not even "admin_modules" when all of the other "admin" files will work. Any ideas?

Quote:
Originally Posted by adampoots View Post
With dollars5 help and a little research i was able to solve this. I will explain for those other code handicapped people out there. I wanted to remove the sidebar from the user and comments page. Here is the line of code I used.

{if $pagename neq "story" && $pagename neq "user"}{include file=$tpl_right_sidebar.".tpl"}{/if}

The double && symbol is what took me the longest to figure out -_-
Reply With Quote
  #6 (permalink)  
Old 09-23-2007, 07:24 PM
spartacus's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Sidebar Issue

Anyone out there also trying to remove the sidebar running into this problem?
Reply With Quote
  #7 (permalink)  
Old 10-05-2007, 10:41 AM
spartacus's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Sidebar Removal

Anyone know how to remove the sidebar on certain pages using the altered code below in pligg.tpl? I can't get it to work for certain pages...

{if $pagename neq "story" && $pagename neq "filename"}{include file=$tpl_right_sidebar.".tpl"}{/if}


Also, can anyone assist in making pages with successfully removed sidebar extend the full width of the page? I've tried adding files to the code in pligg.tpl that extends the "editor" page to 100% but it won't work for "live" for example.

<div id="contentbox" {if $pagename eq "editor" && $pagename neq "filename"}style="width:100%"{/if}>

Thanks
Reply With Quote
  #8 (permalink)  
Old 10-12-2007, 09:41 AM
spartacus's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Remove Sidebar / 100% Width

Anyone able to help on this one?

Thx
Reply With Quote
  #9 (permalink)  
Old 10-12-2007, 11:32 AM
Constant Pligger
Pligg Version: 9.7
Pligg Template: Yget
 
Join Date: Nov 2006
Posts: 160
Thanks: 26
Thanked 1 Time in 1 Post
Spartacus, since no one answered, I had to work it out thru trial and error. Don't even know if this is the most optimized code, but it served the purpose. In this case, i was able to hide the sidebar on the live page and story details. Here's how. Open up pligg.tpl and look for the line that says <div id="content-wrap2">, copy/paste the following and change the highlighted text to the name of the page you want to hide the sidebar to. The following code, for example, hides the sidebar in the live and story (summary) page. Since I don't have any knowledge of php, just couldn't figure out what the heck && meant
Dirty job, but it helped. Hope it serves your purpose too
Quote:
<div id="content-wrap2">

<div id="contentbox" {if $pagename eq "live"}style="width:100%"{/if}{if $pagename eq "story"}style="width:100%"{/if}>
{checkActionsTpl location="tpl_pligg_above_center"}
{include file=$tpl_center.".tpl"}
{checkActionsTpl location="tpl_pligg_below_center"}
</div><!-- contentbox end -->

<div id="sidebar">
{if $pagename neq "live" && $pagename neq "story"}{include file=$tpl_right_sidebar.".tpl"}{/if}
</div><!-- sidebar end -->

</div>

Last edited by nothingman; 10-12-2007 at 01:05 PM..
Reply With Quote
  #10 (permalink)  
Old 10-12-2007, 12:51 PM
spartacus's Avatar
Casual Pligger
 
Join Date: Mar 2007
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Sidebar Solved

nothingman

I finally made it work using your code. I had tried every conceivable thing much like your solution but I found where I messed up. I was placing the new code outside of the trailing arrow versus inside:

<div id="contentbox" {if $pagename eq "live"}style="width:100%"{/if}{if $pagename eq "story"}style="width:100%"{/if}>

Despite this working in Firefox, I am still having trouble making the page align "center" in IE6. Are you having the same problem? The page aligns to the left in IE6...

Thx

Last edited by spartacus; 10-12-2007 at 02:48 PM..
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with disabling sidebar on certain pages! dollars5 General Help 6 09-21-2007 09:19 AM
Remove Sidebar From Story Pages MrMelB "yget" 3 03-28-2007 08:19 PM
How to remove the sidebar? PurpleCow General Help 0 12-11-2006 02:04 AM
How do I make the footer sit BELOW the sidebar on all pages? littledipper Template Support 5 11-29-2006 04:54 PM
Remove "about Pligg box" in sidebar yom23 General Help 9 11-21-2006 06:20 PM


Search Engine Friendly URLs by vBSEO 3.2.0