I'm making a new theme but have problems loading the css. Though I think it is correct to the documentation of Drupal it doesn't work.
I created a folder in /themes/custom/noadin and added the info and libraries files
noadin.info.yml :
name: noadin
description: 'My new theme'
type: theme
core: 8.x
libraries:
- noadin/global-styling
- noadin/global-scripts
and created a noadin.libraries.yml :
global-styling:
version: VERSION
css:
theme:
css/style.css: {}
global-scripts:
version: VERSION
js:
js/script.js: {}
The stylesheet is placed at /themes/custom/noadin/css
Can anyone tell me what it is that I am misunderstanding?
p.s. Drupal is taking the correct theme.
Your info.yml and libraries.yml looking fine, I think may be becouse of caching it is not loading the css and js file try after clearing the cache. (login to your admin area configuration->Development->Performance->Clear all caches) Try after this
You can try look in to this working sample (http://wiki.workassis.com/drupal-8-custom-theme-from-scratch/) this helped me.
Please make sure you have unchecked the following option from -
Home > Administration > Configuration > Development
Aggregate CSS files -- Uncheck and Save Configuration
#Koustav answer helped me a lot. I did changed the drupal/sites/default/files to proper owner since the "Bandwidth optimization menu was disabled and then went to
Home > Administration > Configuration > Development
and unchecked the Aggregate CSS files
Now it's working like a charm!
I was facing the same issue but resolved by doing the below steps.
Goto admin/config/development/performance
uncheck the Aggregate CSS files
uncheck Aggregate JavaScript files
Thanks!!!!!!!
Related
I've been having a problem when trying to comment out a line in a css.liquid file with the VScode shortcut (CTRL+/).
Whenever I do this it puts {%\s*# in front of the line and doesn't comment out the code. I tried disabling all extensions but it's not helping. I haven't touched any settings. When I switch to CSS or Liquid it will comment out fine, but Liquid CSS doesn't work.
Does anybody recognize this issue?
===== This ended up being a problem with the extension itself, it has since been fixed!
I see this issue has been reported lately: Incorrect comment blocks in Liquid files with this extension enabled.
I see this in the liquid css language configuration file:
"comments": {
"lineComment": "{%\\s*#",
"blockComment": [ "/*", "*/" ]
I don't know what the lineComment value is supposed to be but I have never seen a regex value there in other language configuration files - so it may be a mistake.
I built an extension which may be able to help until the language configuration file is fixed: Custom Language Properties.
Install it.
Run the command Custom Language Properies: Check for new language extensions.
Make this setting in your settings.json:
"custom-language-properties": {
"liquid-css.comments.lineComment": "",
}
If this doesn't work immediately, try a reload of vscode.
This basically sets the lineComment's to null and so the blockComment will be used instead. I am not familiar with Liquid comment styles so let me know if that is not how line comments are supposed to work. Demo:
I'm using the free version of mmenu plugin for wordpress. The menu is working correctly but it opens always from the left, even if i set up another position from the option page.
If I inspect the js file "mmenu.js" it seems that the option is passed correctly as I can see it in the code this string:
extensions: { "all": ["position-top"] }
But if I inspect the HTML source there are still the classes as the menu is setup to be opened from the left: (mm-wrapper--position-left, mm-menu--position-left, ...)
I wonder if this is a known issue or just a problem of my website, and if maybe you have a possible solution.
Thanks in advance
Francesco
I've made a copy of the Settings menu (siteConfig) folder to create a CMS menu for adding company Information.
The Menu functions fine, but the CSS doesn't load correctly.
Image:
http://imgur.com/Zb58KNv
LeftAndMain Extension:
http://www.sspaste.com/paste/show/5765ac082c736
Dataobject:
http://www.sspaste.com/paste/show/5765ac3ab26ce
Thanks
-helenclarko
I found an alternative solution to this.
SingleObjectAdmin uses a single data object and shows it similar to site config.
https://github.com/Little-Giant/silverstripe-singleobjectadmin
I am setting up an ASP.netstorefront site and when I edit the menudata.xml, no changes appear. No matter what I do I can not get it to update the menu on the website. Any ideas?
what version are you using?
With ASPDSNF you can find that there are duplicate xml packages. There is a xmlpackages folder within the root /web folder but you may find that copying your xml packages to the relevant App_Templates/Skin1/XmlPackages folder may work
If you are on Multistore then each store would have Skin1, Skin2 etc..
I figured out the problem. In this build, the menu is pulled from topnav.xml.config, not the typical menudata.xml that the manual says the menu comes form.
I was experiencing an odd problem where blocks were not showing up on a site. After a lot of spelunking I have found that block.tpl.php is not getting called/discovered.
Looking at the suggestions that the theme engine is trying to find it looks like the most general template it will look for is block-MODULE.tpl.php - ie if I set up symlinks for block-block.tpl.php, block-views.tpl.php etc then the content will show.
It just won't find block.tpl.php
So I can kind of make the problem go away, but I'd feel a lot better if I could fix it properly.
Anyone know why (or where) this would happen?
This is drupal 6, with a zen subtheme. zen is in sites/all/themes/ the subtheme is in sites/example.com/themes/.
(it does seem to be finding page.tpl)
PHPTemplate will find the more general templates (e.g. block.tpl.php): you can confirm this behavior by looking in the themes/garland folder which has its own block.tpl.php.
The most common reason for the template engine ignoring your template overrides is because the theme registry has not been reset. You can reset it by going to Site Configuration -> Performance and clicking Clear cached data at the bottom of the page.
Also make sure you've gone through and followed the instructions for sub-theming exactly: missing a step can produce unexpected results:
How to build your own sub-theme (6.x-2.x)
How to build your own sub-theme (6.x-1.x)
Turns out I had added a to the hook_theme() function in template.php for blocks that was pointing to a different location and confusing everyone.
Why I did that is lost to history, but it seems to server no useful purpose.
there should be a version of block.tpl.php in both the theme and subtheme directories.