Declaring Pagename on Static Pages

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-28-2009, 11:43 PM
New Pligger
 
Join Date: Jun 2009
Posts: 24
Is there any way to use $pagename to set a page name for static pages created? I need to set this for a new page I created to be able to modify the sidebar when this page loads.
Reply With Quote
  #2 (permalink)  
Old 07-29-2009, 12:52 AM
cmstheme's Avatar
Donor/Coder
Pligg Version: 9.9
Pligg Template: Squaretle
 
Join Date: Jan 2007
Location: Philippines
Posts: 531
This one:
PHP Code:
// Pagename 
define('pagename''custompage'); 
$main_smarty->assign('pagename'pagename); 
Reply With Quote
  #3 (permalink)  
Old 07-29-2009, 09:37 AM
New Pligger
 
Join Date: Jun 2009
Posts: 24
I tried that - but on the static pages created through the admin panel this shows up as text for some reason. Any ideas?
Reply With Quote
  #4 (permalink)  
Old 07-29-2009, 01:41 PM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
CMStheme: You can't use smarty tags in the page content like that because it treats the text input the same as it would for a story.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #5 (permalink)  
Old 07-29-2009, 06:33 PM
New Pligger
 
Join Date: Jun 2009
Posts: 24
Would it be a better solution to create a new php page with $pagename, a .tpl and just load that tpl in the php page?
Reply With Quote
  #6 (permalink)  
Old 07-30-2009, 02:51 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Well, how many pages are you going to create and do you want the sidebar to appear on all of them? There is an existing pagename variable for all pages if you use...
Code:
 {if $pagename eq "page"} This is a page {/if}
It might not be a bad idea for us to add some way to add php code to a page from the page editor though. Let me think about it for a day.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #7 (permalink)  
Old 07-30-2009, 05:33 PM
New Pligger
 
Join Date: Jul 2009
Posts: 11
you can check if the pagename is a page and then check for $posttitle which contains the actual page title.

{if $pagename eq "page"} {$posttitle}{/if}

Hope this helps.
Reply With Quote
  #8 (permalink)  
Old 07-31-2009, 10:13 AM
New Pligger
 
Join Date: Jun 2009
Posts: 24
I have one static page that I want a new specific sidebar module to show up on, so however I can make that possible...
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pages Pagename Value teachwny Questions and Comments 1 07-12-2009 03:29 AM
Trouble getting user 'inbox' to display on new pages betagirl Questions and Comments 1 07-19-2007 06:06 PM
Creating Static Pages... SoapTaco Questions and Comments 2 06-02-2007 05:11 PM
creating static pages? stevelucky Questions and Comments 0 06-29-2006 03:06 PM
Multiple Pages of Top Pliggers even when there aren't many nickaster Questions and Comments 1 04-16-2006 07:41 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development