Question:
Change Browser Title from PHP include (middle of page)?
?
2011-07-28 13:11:50 UTC
I know there is a way to change the page title with php, but my question is I have my index.php page that is the default layout of the page, and then the main section of the page is what changes with php includes.

What I want to to is add code to those php includes that also set's the page title, as well as the main section contents. Can someone give me some code to do that, and what to put in the index.php page code also?

Thanks!
Four answers:
anonymous
2011-07-28 13:17:51 UTC
Hey I seen this online and maybe this will help:

$document =& JFactory::getDocument();

$document->setTitle ($title);



obviously you will have to create a variable with the name of title but I am unsure if it will work.



EDIT: I think you may need to also include the joomla.php
?
2011-07-28 23:40:30 UTC
In the include.php files... Do this:





PUT THE TITLE HERE






Insert PHP here.

?>





faneendra
2011-07-28 13:18:19 UTC
This would be a better forum to ask your question/s:

http://forums.devshed.com/php-development-5/
?
2016-11-30 00:34:01 UTC
you need to use ordinary if shape to dynamically replace the call section


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...