Pagetitle

Permalink 3 users found helpful
I'm editing a template and need to output the page-title at a specific region of the page.
How can I achieve this?

 
pvernaglia replied on at Permalink Best Answer Reply
pvernaglia
Get a Page's Name
$c->getCollectionName();
  Display page name
  <?php echo $c->getCollectionName() ?>
  *You may need global $c; first
gwgs81 replied on at Permalink Reply
Works well, thank you! (:
designaroni replied on at Permalink Reply
designaroni
Nice! this is slick, Thanks!
sherri333 replied on at Permalink Reply
sherri333
Thanks, this is very helpful!
SteamSynthetic replied on at Permalink Reply
If your using the page title to echo out a class name, this works better:
<?php echo $c->getCollectionHandle() ?>

That way, if for instance, you were on an "About" page, and you wanted to echo that as a class somewhere in the document. it would appear as "about"

Example:
<div class="<?php echo $c->getCollectionHandle() ?>">