echo-ing the page's title into the template

Locked
User avatar
janwin
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Aug 25, 2005 8:21 pm
Location: Kiel

echo-ing the page's title into the template

Post by janwin » Fri Jul 13, 2007 4:12 pm

Hi all,

I was wondering if it would be possible to echo the current static page's title into a template.

For example, I am currently having a in my template that is outside the user's viewport and just sits there for semantic and screenreader/seo purposes, like so:



So, I am obviously displaying the sitename here.
What I would love to do is enhance that by also displaying the current page's title (similar to the in the ), like so:

- PAGE TITLE

I was fiddling around with title;?>, but that does not seem to work directly in the template.

Any ideas? Then I'd love to hear them!

User avatar
rdeutz
Joomla! Explorer
Joomla! Explorer
Posts: 361
Joined: Thu Aug 18, 2005 6:50 am
Location: Germany - Aachen
Contact:

Re: echo-ing the page's title into the template

Post by rdeutz » Sun Jul 15, 2007 9:40 am

janwin wrote:
- PAGE TITLE

I was fiddling around with title;?>, but that does not seem to work directly in the template.

Any ideas? Then I'd love to hear them!
Hi Jan,

this should work.

getPageTitle(); ?>
Best Regards, Robert
My Blog: http://www.robert-deutz.de - follow me on twitter @rdeutz
Professional Services for Joomla! http://rdbs.de - follow on twitter @rdbsnews

User avatar
janwin
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Aug 25, 2005 8:21 pm
Location: Kiel

Re: echo-ing the page's title into the template

Post by janwin » Mon Jul 16, 2007 7:34 am

Hi Robert,
Thanks! That does indeed work! Made the beginning of my day.... ;-D

Is there some kind of reference somewhere about these mainframe functions?

Greets,
janwin


Locked

Return to “Design and Accessibility - Archived”