Wiki source for DanWestPgHeader

Show raw source

===Custom Page Header===

~- Author control over page header
~- Users "fake" ""{{pagetitle}}"" action.

~- include ""{{pagetitle ""//""The page title here""//""}}"" anywhere in the page.

~- Create a "pagetitle.php" as an empty file in the //actions// folder.
~- Put the following code into the ##wakka.class.php## file.
~- Modify the ##actions/header.php## to use **""$this->PageHeader()""** to populate the page title HTML tags.

**Added to wakka.class.php**
// DW - Added (Process {{pagetitle name}} fake action)
function PageHeader() {
$title = "";
$pagecontent = $this->page["body"];
if (ereg( "({){2}pagetitle ([^}\n]+)(}){2}", $pagecontent, $title)) {
$title = $title[2];
if ($title) return strip_tags($this->Format($title)); # fix for forced links in heading
else return $this->GetPageTag();


$PgTitle = $this->PageHeader();
<title><?php echo $PgTitle; ?></title>

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki