Css file modified into temp php file in server (joomla)
I have added this below code for css reference.
JHTML::_('stylesheet', 'example.css', 'components/'._THISCOMPON开发者_Go百科ENT.'/assets/css/');
It is working fine in local.But when i try to run it in the server, the css is not working due to this output html css link
<link rel="stylesheet" href="/components/com_fms/assets/css/css-3391b7d3949af1560b9927c0c3a672b2.php" type="text/css" />
Do anyone have idea on solving this issue?
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
By default this code work correct if it is added in template-file (templates/my_fantastic_template/index.php)
Try this code:
$document =& JFactory::getDocument();
$document->addStyleSheet('components/'._THISCOMPONENT.'/assets/css/example.css');
I hope it will be helpfull.
Try using
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
instead
JHTML::_('stylesheet', 'example.css', 'components/'._THISCOMPONENT.'/assets/css/');
complet /templates/system/css/system.css
with your url to the css file
精彩评论