Changing Logo header image for different media types
Posted: Mon Oct 29, 2012 8:29 pm
My current Logo/Header scales nicely with the Protostar template option fluid_layout set to on.
But I need to display a less complicated logo/header image on handhelds. So I'm wandering how to change the index.php file for the Protostar Template so it would test the media type and load a header image for different media types?
ie.
if (@media handheld) then load alternate image from the one set in the template
else run normal.
Thanks
But I need to display a less complicated logo/header image on handhelds. So I'm wandering how to change the index.php file for the Protostar Template so it would test the media type and load a header image for different media types?
ie.
if (@media handheld) then load alternate image from the one set in the template
else run normal.
Thanks
Code: Select all
// Logo file or site title param
if ($this->params->get('logoFile'))
{
$logo = '<img src="'. JURI::root() . $this->params->get('logoFile') .'" alt="'. $sitename .'" />';
}
elseif ($this->params->get('sitetitle'))
{
$logo = '<span class="site-title" title="'. $sitename .'">'. htmlspecialchars($this->params->get('sitetitle')) .'</span>';
}
else
{
$logo = '<span class="site-title" title="'. $sitename .'">'. $sitename .'</span>';
}