Printing the PageTitle in a Theme

Permalink 1 user found helpful
Hi guys,

Stupid question to kick-start my active involvement on the Forum (been working with Concrete 5 for a couple of weeks now, and with browsing the how-tos and the forums and a bit of good old fashioned trial & error I've managed to accomplish all I have wanted and more). One thing I just CANNOT figure out is how to print the page title in my themes pages!! I'm sure there is a simple, blindingly obviously way to accomplish this, but I've had no joy.

All I want to do is replace:

<?php echo SITE?> with <?php echo pagetitle?> or <?php echo $pageTitle?> or <?php echo TITLE?> but nothing has worked so far.

Any help?

arcanepain
 
andrew replied on at Permalink Reply
andrew
It's a little counterintuitive, since there's no obvious reason for calling the page object $c (and what's a collection, anyway?) But this is the way it's done.

<?php
print $c->getCollectionName();
?>


The $c variable should be in the scope of your theme without having to do anything to import it.
c5mix replied on at Permalink Reply
look at this post for a little more info:
http://www.concrete5.org/index.php?cID=498...