Hi there,
I am new to joomla and PHP, but have extensive experience in ASP.net. I would like to know how to simply output the page name, or the "itemid" to the page, so that I can input it into a flash movie i am using for the menu on my site.
Can any brave soldier assist me with this?
Also, one of the things i did like about .net was the extensive documentation and samples that were packaged with it (.net 2.0 SDK documentation). The .net documentation, outlines all of the commands you could use in C# as well as examples of usage. Can someone tell me if i can download such a thing for PHP, or access a website that will provide me with this data?
Thanx,
Gavan
Getting Page name
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Forum rules
Re: Getting Page name
Head over to php.net for a reference of the PHP language.
To get the pagename, you do:
Ian
To get the pagename, you do:
Code: Select all
$document =& JFactory::getDocument();
echo $document->getTitle();
Ian
Help test my Component XML Generator Tool!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1997/Itemid,35/
All feedback appreciated!
Re: Getting Page name
Thanx Ian,
Much appreciated
Much appreciated
Re: Getting Page name
I'm getting an error: "Fatal error: Class 'JFactory' not found in C:\sites\premium6\lomaxgroup\webroot\joomla\templates\lomaxgroup\index.php on line 29"
I assume i have to include and/or install the JFactory Library, How do I do this?
I assume i have to include and/or install the JFactory Library, How do I do this?
Re: Getting Page name
I guess i should have stated that i have 1.0 installed.
Re: Getting Page name
Most likely your missing and include
this is at the top of content.php component
defined('_JEXEC') or die();
jimport('joomla.application.component.controller');
this is at the top of content.php component
defined('_JEXEC') or die();
jimport('joomla.application.component.controller');
This day it is my wish that I helped you to live
Re: Getting Page name
Ah your in the wrong forum
this is 1.5 coding 101
this is 1.5 coding 101
This day it is my wish that I helped you to live