Creating Static Page

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 01-17-2008, 05:31 AM
New Pligger
Pligg Version: 9.9.9
Pligg Template: Default
 
Join Date: Jan 2008
Posts: 1
Hi... I would like to create a static page and put a navigational button linking to that page. It is easily done in other CMS like Joomla. But I cannot do it in Pligg.

So far I have been loggin in from front-end as administrator... should I login through any specific page to get more access to the site configuration?

(I think I did that once after the installation, but I lost the url. silly me)
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 07:16 AM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Try this:

http://forums.pligg.com/30857-post3.html


Geoserv
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 12:46 AM
New Pligger
 
Join Date: May 2007
Posts: 22
Here's what I've came up with:

PHP Code:
<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
//         http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".

include_once('Smarty.class.php');
$main_smarty = new Smarty;

include(
'config.php');
include(
mnminclude.'html1.php');
include(
mnminclude.'link.php');
include(
mnminclude.'smartyvariables.php');

// sidebar
$main_smarty do_sidebar($main_smarty);

// breadcrumbs and page title
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_About');
$navwhere['link1'] = getmyurl('about'$dblang);
$main_smarty->assign('navbar_where'$navwhere);

// pagename
define('pagename''faq-en'); 
$main_smarty->assign('pagename'pagename);

// show the template
$main_smarty->assign('tpl_center''contact');
$main_smarty->display($the_template '/pligg.tpl');
?>
That works perfectly for my "contact us" page. I can now go to mysite.com/contact.php
Anybody know how can I change the page title?
Reply With Quote
  #4 (permalink)  
Old 02-16-2008, 01:55 AM
redwine's Avatar
Pligg Donor
Pligg Version: 9.8
Pligg Template: custom templat
 
Join Date: Jul 2007
Location: Canada
Posts: 216
Quote:
Originally Posted by kidblogger View Post
Here's what I've came up with:

PHP Code:
<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
//         http://www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
 
include_once('Smarty.class.php');
$main_smarty = new Smarty;
 
include(
'config.php');
include(
mnminclude.'html1.php');
include(
mnminclude.'link.php');
include(
mnminclude.'smartyvariables.php');
 
// sidebar
$main_smarty do_sidebar($main_smarty);
 
// breadcrumbs and page title
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_Breadcrumb_About');
$navwhere['link1'] = getmyurl('about'$dblang);
$main_smarty->assign('navbar_where'$navwhere);
 
// pagename
define('pagename''faq-en'); 
$main_smarty->assign('pagename'pagename);
 
// show the template
$main_smarty->assign('tpl_center''contact');
$main_smarty->display($the_template '/pligg.tpl');
?>
That works perfectly for my "contact us" page. I can now go to mysite.com/contact.php
Anybody know how can I change the page title?
The title of the page is loaded in the pligg.tpl file in your templates folder with this statement:

Code:
<title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)}{$posttitle}{/if}</title>
So we are looking for the $posttitle variable.

To assign a title to a page, you have to assign the variable in the block // breadcrumbs and page title.

Example:

You created a "Agreement" page.

The block section // breadcrumbs and page title normally includes the following:
Code:
// breadcrumbs and page titles
$navwhere['text1'] = $main_smarty->get_config_vars('PLIGG_Visual_User_Agreement');
$navwhere['link1'] = getmyurl('agreement', '');
$main_smarty->assign('navbar_where', $navwhere);
$main_smarty->assign('posttitle', " / " . $main_smarty->get_config_vars('PLIGG_Visual_User_Agreement'));

Make sure you add this to the /libs/lang.conf (if version is not 9.9.0) or /languages/lang_english.conf (for v9.9.0)
Code:
//<SECTION>BREADCRUMBS</SECTION><ADDED>0.73</ADDED>
PLIGG_Visual_User_Agreement = "Agreement"
Reply With Quote
Reply

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
Static Home Page - newbie question. koolkatwebdesigns Questions and Comments 1 06-04-2009 04:40 PM
Creating Static Pages... SoapTaco Questions and Comments 2 06-02-2007 05:11 PM
9.1 :: Errors keep pouring in after succesfully Creating Tables The Edifier Questions and Comments 1 05-01-2007 02:15 PM
creating static pages? stevelucky Questions and Comments 0 06-29-2006 03:06 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