Following Smarty vars are available for use in your layouts:
- {$title} - page title
- {$keywords} - keywords for use in META tags (from page configuration tab in back-end)
- {$alttitle} - ???
- {$canonical_url} - displays (smart) url of a page within a template, can be used to avoid duplicate content
- {$pt_debug} - will display debug infos. See: Debugging Facilites
- any includes {$pt_includeX} and content blocks {$pt_blockX} you define in Admin → Layout → Configuration
In future versions (>2.92) you will be able to add your own custom Smarty tags in Layouts by extending the PhenotypePageStandard class and overwrite the display() and render() methods:
class PhenotypePage extends PhenotypePageStandard { function display($cache=1,$sendHeader=1) { global $myPT; $myPT->startBuffer(); parent::display($cache,$sendHeader); $html = $myPT->stopBuffer(); $html = str_replace("#!#logged_in#!#",$logged_in,$html); echo $html; } function render($ver_id,$buildcache=0,$editbuffer=0) { $mySmarty = new PhenotypeSmarty(); $mySmarty->assign("logged_in","#!#logged_in#!#"); return parent::render($ver_id,$buildcache,$editbuffer,$mySmarty); } }
You think Phenotype Wiki/Documentation could be better?
We too. Please contribute: Edit this page
Recent Blog Posts
- Finally Multibyte - Phenotype 3.0
- Phenotype 2.9 explained
- Integration of PHPIDS (PHP-Intrusion Detection System)
- New Release: Phenotype 2.8 Ready for Download
- Restart: New Phenotype Website Live
- Phenotype worth: 2 Million $
- New Feature: Automatic Image Version Creation
- Additional smartURL variable: smartPATH