Fetch page title/categories using PHP

More
13 years 10 months ago #13680 by openg
Hi all,
I need to be able to dynamically fetch the page title and category of the flexicontent page that the end user is accessing, so that I can use them in a module I am working on.
I found this solution but it didn't work:
.....<?php
$mydoc =& JFactory::getDocument();
$mytitle = $mydoc->getTitle();
?>
in the index file of the joomla template and
<?php echo $mytitle; ?>
Where I wanted to insert the page title.....

Am I right in assuming that I need to use some other method to fetch the page title and category, if so can you steer me in the right direction.
Cheers for your time,
Dominic

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #13684 by openg
For anyone else that is searching on the boards I solved this by using this code:
<?php $doc =& JFactory::getDocument();
echo '' . $doc->getTitle(); ?>
I'm not really a coder at all so am not even on the first rung,
Merci chef,
Dominic

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #13693 by micker
thanks for this return

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.347 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline