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
$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();
Can this not just be done by using the <link> tag in head.phtml?
Related
Where should I put my css file if I have only one file (style.css) ?
I use sass for my project and I convert all my sass files to only one css file.
But I don't know where I have to put this file.. because normally I would create a static folder for each app but I think that makes no sense if I have only one file...
You just need to put the CSS file somewhere and tell HTML were to find using the link tag.
For example, if the file is in the folder "style" the tag will be.
<link rel="stylesheet" href="/style/file.css" />
Usually the main css style fail was in the root folder or in a style folder.
Is there any way to make JetBrains PhpStortm (v8) to navigate to the SASS file when I Ctrl+cilck on a CSS class/id in the HTML source, insted of the default (to the CSS file class/id) setting? It would be great, and I cant find a soloution. Thanks in advance!
It's not really supported:
https://youtrack.jetbrains.com/issue/WEB-6737
https://youtrack.jetbrains.com/issue/WEB-8190
Please star/vote/comment to get notified on progress.
Although I have to say that in LESS it's kind of works for simple classes/ids (not made from parts via & or multi-level ones): it asks to which declaration to go and offers me 2 files: file.css or file.less.
I found a half-solution!
If I link the scss file in the head, then I can select the SASS declaration. Yay! :D
<link href="/css/sass/main.scss">
Thats work for me.
For PhpStorm I solved this with:
In the project browser, right click on the .css file that you'd
like to ignore.
Go to "Override file type".
Select "Plain text".
Now when you command click a style it will navigate directly to the .scss file and NOT the .css file. The .css file will be read by the browser but ignored by PhpStorm.
I use the lesscss, it's works fine, but the Eclipse editor doesn't highlight the words, and the Zen Coding doesn't recognize that a css file. How can I open the .less file as a .css file?
Any help would be appreciated.
I found the solution: in the general menu -> content types option I can add a file association to the css content type.
I have a joomla site. And I have a component installed which has it's own css file positioned in the actual component files, I would like to position this css file to another folder (not in component files), so I copied the css file to where I need to, and now I'm looking where in the code is written the PATH to the css file... and I found the code :
$this->addCSS('layout');
the file is called "layout.css".
How can I change this code to a path something like "/template/bluedilema/css/layout.css"
Somebody PLEASE help if you can.
Thanks
Have you tried:
$this->addCSS('./../template/bluedilema/css/layout.css');
Please note you have to adjust the path.
Hope this link will help you!
http://www.howtojoomla.net/how-tos/development/how-to-add-cssjavascript-to-your-joomla-extension
Is it possible to remove the module/system/default.css file. I'd like to do this in the .module file and not in the template.php file.
My goal is to disable this style in my drupal website without manipulating a template/theme.
Is it possible?
Thanks in advance,
Bat
This is possible. You can use template_preprocess_page in your custom module to whack Drupal's default CSS:
function mymodule_preprocess_page(&$vars) {
// Get CSS array and remove selected stylesheets
$css = drupal_add_css();
unset($css['all']['module']['modules/system/defaults.css']);
// Override Drupal styles
$vars['styles'] = drupal_get_css($css);
}
Because of Drupal's architecture, you'll almost certainly need to set the module weight to something greater than your other installed modules to ensure that your preprocessor runs last and no other module will be adding CSS.