Go Back   Pligg CMS Forum > Pligg Help > Wiki Articles

 
 
LinkBack Article Tools Display Modes
  #1 (permalink)  
Old 08-13-2008, 03:59 AM
Yankidank's Avatar
Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 1,823
Thanks: 110
Thanked 182 Times in 128 Posts
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
Pagename Variables

Reserved for future media.
__________________
Need a Pligg Host?
Get 3 free months
when you buy a year of hosting.
Use the coupon PLIGG at either...
MidPhase hosting starting at $7.95/month.
ANhosting hosting starting as low as $4.95/month.

Last edited by Yankidank; 08-13-2008 at 04:16 AM..
Reply With Quote
  #2  

Page Variables

What are Page Variables?


Page variables are used to define what page a user is on. Variables are used in Pligg templates to determine whether or not you should display content by using {if} tags, this method is similar to many programming languages such as PHP.

Pagename variables are defined in .php files to determine what page you are currently viewing. If you open up index.php, for example, you will find the code below which assigns the pagename variable "published" to the Pligg homepage.
PHP Code:
// pagename    
define('pagename''published'); 
$main_smarty->assign('pagename'pagename); 
Below are example codes that you can use with these variables, in these examples "story" is the page name that can be replaced with one of the variables listed lower on this page.

Code:
{if $pagename eq "story"}
Content to show if it IS a story page
{/if}
Code:
{if $pagename neq "story"}
 Content to show if it's NOT a story page
 {/if}

Pligg Page Variable List


Below is a list of variables that can be used to define the page. Next to each variable is an equal sign ( = ) followed by a description.
  • admin_index = Main Admin Page
  • cloud = Tag cloud
  • edit_page = Editing a Page
  • editlink = Editing an Article
  • live = Main live page
  • live_comments = Comment live page
  • live_unpublished = Unpublished live page
  • live_published = Published live page
  • profile = User profile page
  • register = Registration page
  • search = Search Results
  • story = Story page
  • submit = Submission pages (steps 1-3)
  • tools = ?
  • topusers = Top User page
  • user = User profile page when logged in and able to modify


Contributors:
Created by Yankidank, 08-13-2008 at 03:59 AM
Last edited by Yankidank, 08-28-2008 at 02:53 AM
1 Comments , 726 Views
 

Article 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 Off
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Title - Instant Need plum Suggestions 5 10-17-2007 01:57 PM
Voting works on page 1, not page 2 jrothra General Help 3 08-02-2007 12:45 AM
Suggestion: Friendlier urls for user page revolver General Help 0 07-06-2007 12:44 PM
Add page nav number to top of page kanedaguy General Help 1 02-03-2007 11:31 AM
tags take me to error page? lithman General Help 2 05-14-2006 09:05 AM


Search Engine Friendly URLs by vBSEO 3.2.0