Hi everyone.
I have some troubles with a CSS.
I design a simple html with a css file using <link href="mycdd.css" media="all" rel="stylesheet" type="text/css" />. Everything works perfectly .
Then I moved the css to my plugin and I extended the elgg.css using: elgg_extend_view('elgg.css', 'plugin_name/mycdd');
But my css has not effect on my elgg installation even when I flush the caches. Moreove when I edit elgg.css file from my elgg data directory I can see my custom css in it.
I dont know what's wrong
Best regard.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- Hermand Pessek@rheman
Hermand Pessek - 1 like
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- The server's caches
- The browser's caches
- CDN cache (e.g. Cloudflare etc)
- Go to Administration -> Advanced settings
- Uncheck Use simple cache Use system cache Compress JavaScript and Compress CSS
- Save
- Now flush the caches and check your site
- Turn on all settings again if all works
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 1 like
- iionly@iionly
iionly - 1 like
- Hermand Pessek@rheman
Hermand Pessek - 0 likes
You must log in to post replies.yes I did it
elgg_extend_view('elgg.css', 'plugin_folder_name/mycdd.css');
The folder_name_in_mod_pluginname_views_default_where_my_file is locates has the same name as my plugin folder name 'plugin_folder_name'
Well. Should works
I did it before my post... But it is not working I dont know why...
There's one trick:
If don't work then see on above tips about caches.
And keep in your mind that you plugin must be at the bottom after all another plugins on the Plugins' page and your extended view (elgg_extend_view('elgg.css', 'plugin_folder_name/mycdd.css');) must be at the bottom after all another extended views in start.php of your plugin.
In the last case you can use also:
w/o moving your code
With
you would need to place mycdd.css at
The paths in elgg_extend_view are always relative to the views/default folders (either within plugins or of Elgg core).
After changes, flush the Elgg cache (or keep caching disabled during developing).
Thanks a lot