t.c
t.c

Reputation: 1257

Magento, add Css file from media folder

Is it possible tu add a Css file from the "media" folder!? In the normal way we put the css file into the "skin" folder and then we use "addCss()"! But I need it to be in the "media" folder ! Thanks for Helping

Upvotes: 1

Views: 1432

Answers (2)

t.c
t.c

Reputation: 1257

$path = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'my_folder/';
$file=$this->getTypeCss();
$param='rel="stylesheet" type="text/css"';
$this->getLayout()->getBlock('head')->addItem('link_rel', $path.$file, $param);

return parent::_prepareLayout();

Upvotes: 1

Calvin
Calvin

Reputation: 630

Can this not just be done by using the <link> tag in head.phtml?

Upvotes: 0

Related Questions