Postings

You can freely browse the forum and post in the community forum.
However, you need a valid license to write posts for support (own a valid commercial software license or have purchased a support membership).

Posts only show once reviewed. This is mainly preventive to keep spam away. Thank you for your understanding!

Not load CSS?

  • dbrat
  • dbrat's Avatar Topic Author
  • New Member
  • New Member
More
IP: 173.165.146.206 11 years 11 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
More
IP: 109.211.26.254 11 years 11 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.