How to show the forecast city in title of the of the page instead of the component / link name.
For example on the distribution websites demo: http://www.robertjlavey.com/index.php?option=com_eweather&Itemid=9
You will see the page title is eWeather with no reference to the weather conditions in "Siloam Springs, AR"
To correct this you will need to edit the components/com_eweather/eweather.html.php
Find the following 2 lines:
function displayWeather(&$weather, $weatherIconStyle){
$url = JUri::base(true);
Directly under these 2 lines you need to add:
$document =& JFactory::getDocument();
$document->setTitle($weather->loc_city);
It will now look like:
function displayWeather(&$weather, $weatherIconStyle){
$url = JUri::base(true);
$document =& JFactory::getDocument();
$document->setTitle($weather->loc_city);
No comments:
Post a Comment