Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

question-circle Not load CSS?

More
9 years 4 months ago #3940 by dbrat
Not load CSS? was created by dbrat
Hi Olivier,

Amazing plugin! I'm just getting started with it, but have 2 questions.

#1) Is there a way to not load any .css files? Some built in tags have !important attached which makes it hard to overwrite. And my theme does a lot of the responsive handling already (yootheme) which conflicts with some static image dimensions.

It would be real handy if all the CSS was handled by my template file.


#2) What's the best practice for altering the output beyond what the settings can do? Would it be adding a new Module Layout in the /tmpl/ folder & selecting it as an Alternative Layout in the module settings? ie: If you look at my current homepage , near the bottom are 3 rows of articles, labeled "Crowdsourcing", "Open Innovation" & "Crowdfunding." I only show the image & description of the 1st item. Then just the headline of #2 & #3.

I was able to recreate this look on my test site using a new file (/tmpl/mystyle.php). Is that the best practice?

Thanks Olivier,
-David

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #3942 by admin
Replied by admin on topic Not load CSS?
Hello David,

first of all, thank you!
Now for your questions:

1- There is no way to prevent the CSS files from the module to load (unless you hack the code). I am planning on revamping the module early January and will work on better CSS management (caching and simpler styles mostly). A lot of the styles are created 'on-the-fly' from the parameters set in the module, so I hardly see a possibility to avoid any CSS to load.

I agree the '!important' keyword makes it hard to overwrite and I always try and avoid it. That will also be one of the features I will be working on in the module 'cleaning'.

Modules are independent from the templates so I hardly see any way to have CSS files handled through the template file, unless tailored to your site.

2- The proper way to alter a module's output is by template overrides.
Do not add any files in the module's folder 'tmpl', it could be erased in the next updates (what you did works but is not safe from being wiped out later on).
In your template's 'html' folder, add the directory 'mod_latestnewsenhancedextended'. In it, add an empty 'index.html' and a copy of the 'default.php' file found in the module's 'tmpl' folder (unless you use K2, then you copy k2.php). In your case, I believe the file 'mystyle.php' has to be moved there.
Like you did previously, select the copied file from the 'alternative layout' setting.

Olivier.

Please Log in or Create an account to join the conversation.