r171 return page title - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: GS Development Testing - (alpha/beta) (http://get-simple.info/forums/forumdisplay.php?fid=14) +--- Thread: r171 return page title (/showthread.php?tid=878) |
r171 return page title - trilulilu17 - 2010-07-26 Hi! I wanted to tell you guys that Code: <?php return_page_title(); ?> r171 return page title - Carlos - 2010-07-26 return_page_title() returns the page title. To display the title, you should: Code: <?php echo return_page_title(); ?> Code: <?php get_page_title(); ?> r171 return page title - trilulilu17 - 2010-07-27 Carlos Wrote:return_page_title() returns the page title. To display the title, you should: Sorry, my fault! I didn't know that. But I have to ask what is this useful for? I can find it useful for a plugin, but for a template? r171 return page title - Zegnåt - 2010-07-27 trilulilu17 Wrote:But I have to ask what is this useful for? I can find it useful for a plugin, but for a template? Code: if (trim(return_page_title())!='') { echo '<h1>'.return_page_title().'</h1>'; } Or maybe you want to use Shaun Inman’s Widon’t: Code: <h1><?php echo preg_replace('|([^\s])\s+([^\s]+)\s*$|', '$1 $2', return_page_title()); ?></h1> As long as these kind of things exist and will be created in the future you’ll want to be able to pass the title into your own PHP code within a template. At least that’s what we think and that’s why the return_ functions are included. r171 return page title - trilulilu17 - 2010-07-29 Zegnåt Wrote:trilulilu17 Wrote:But I have to ask what is this useful for? I can find it useful for a plugin, but for a template? I see it now. Thank you! |