Create New Page Variable for Page.php?

Register an Account
Reply
 
Thread Tools Display Modes
  #11 (permalink)  
Old 03-10-2010, 01:58 PM
New Pligger
 
Join Date: Dec 2009
Posts: 20
Yankidank, I've attached a screenshot and where it says "Published News", this text is the title I'm referring to which is showing on most of the pages, but on the about pages and the story pages it isn't showing by default (for example instead of published news I would want it to display "About Pligg" on the about page). Thats what I'm trying to do and managed to do in my own special way with defining the page variable.
Even though your intention wasn't for me to use it the way I did. I still figured it out thanks to your explanation of header.tpl & "posttitle", and a big thanks for that!

Thanks again, Jonas
Attached Thumbnails
Create New Page Variable for Page.php?-example.gif  
Reply With Quote
  #12 (permalink)  
Old 03-10-2010, 03:25 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
Add the following just before "<!-- END BREADCRUMBS -->" in header.tpl.

For the page title to appear as the large <h1>:
Code:
{if $posttitle neq "" && $pagename eq "page"}<h1>{$posttitle}</h1>{/if}
For the story title to appear as the large <h1>:
Code:
{if $posttitle neq "" && $pagename eq "story"}<h1>{$posttitle}</h1>{/if}

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #13 (permalink)  
Old 03-11-2010, 01:51 PM
New Pligger
 
Join Date: Dec 2009
Posts: 20
Quote:
Originally Posted by Yankidank View Post
Add the following just before "<!-- END BREADCRUMBS -->" in header.tpl.

For the page title to appear as the large <h1>:
Code:
{if $posttitle neq "" && $pagename eq "page"}<h1>{$posttitle}</h1>{/if}
For the story title to appear as the large <h1>:
Code:
{if $posttitle neq "" && $pagename eq "story"}<h1>{$posttitle}</h1>{/if}
Yankidank, thanks once again. I made the changes and its working perfectly!
Reply With Quote
Reply

Tags
html1.php, page variable, variable

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Variables Yankidank Wiki Articles 3 05-19-2011 09:21 AM
I want create a new Page in Pligg Ver-9.9.5 gaurangitech Questions and Comments 2 09-02-2009 10:49 AM
How to create Page Links in Menu & Subpages graham414 Questions and Comments 0 08-20-2009 03:19 PM
Can't create new page or install module in Pligg RC4 blueven Questions and Comments 0 04-12-2009 11:37 PM
How to add comments to new Pages, create custom feedback page mrigank Questions and Comments 2 02-23-2009 01:07 AM


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