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

Leave a review

file CSS loaded over and over

More
11 years 10 months ago #1433 by slavelle
CSS loaded over and over was created by slavelle
Hi,

This post is mostly being directed towards the developers of Trombinoscope.

I'm using your module to show the staff of a local high school's athletic coaching staff. A part of this is showing the staff of an individual sport on the page dedicated to that sport. To do this, I load a module (using {loadposition ...} into a tab on the sport's page. Since I have about 20 sports, I wanted to use the articles that I use for each in an overall coaching staff page, so I use Articles Anywhere to pull these articles, which are pulling the module positions.

Here's the issue: On the overall staff page, the Trombinoscope Extended module is loaded about 20 times. This causes the css at the beginning of the trobinoscope module to load over and over. This makes it so the Internet Explorer 31 stylesheet limit is blown, which causes the page to then lose my template theme css because it gets bumped off the bottom of the css list.
I have resolved this by enabling the css minify and compress option in the T3 framework, but I'd like to have this act "correctly".

I originally thought it was an issue with the Articles Anywhere plugin, but it turns out to be this CSS limitation. I reported the issue to the author of Articles Anywhere and they said that the module should not load the css over and over, instead telling Joomla what css should be loaded and that Joomla should dictate that the css only be loaded once. You can see this response here: www.nonumber.nl/forum/ArticlesAnywherePR...ternet-Explorer#8074.

If you are interested, here's a short screencast of what happens in Internet Explorer when all these css files are loaded: screencast.com/t/HJSpceG6THD

Is there anything else I can do here to resolve this issue besides enableing the minify and compress of the css?

Thoughts?

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

More
11 years 10 months ago - 11 years 10 months ago #1434 by admin
Replied by admin on topic Re: CSS loaded over and over
Hello,
I totally understand the problem and although it is about 1am here, I wanted to give you a quick answer before the holidays.
It is a dilemma... give the users the choice to present different modules on the same page with different looks or be rigid and have one style for all... The component was meant to be the most flexible so the choice has been made to keep a stylesheet for every instance of the module. Unfortunately, IE has limitations in order to avoid memory overload of the browser.
What you are trying to achieve probably could be done another way. The Trombinoscope view has been created for you to do just what you need. By creating a menu item, you can add pagination and present your different sports as a directory. The directory can be styled (by default each category is represented by a simple link) as tabs or buttons (each one representing a sport) and the component will present the athletes per sport. There is an example on the demo site with a directory of endangered species.
If you need elements before and after that directory, you can select articles in the parameter settings of the menu item.
Anyway, by using this solution, you will only have one CSS to load and it is a much simpler solution, not to mention much faster as you don't have to use an extra module to get the Trombinoscope's content into each tab, calling 20 instances of each... It is all done in one shot.

Olivier.
Last edit: 11 years 10 months ago by admin.

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

More
11 years 10 months ago #1440 by slavelle
Replied by slavelle on topic Re: CSS loaded over and over
Thank you for your insights on this. I have dealt with the "problem" with the minify/compress options. I may have a look at the options you have selected.

I would like to know if there is a way to put the css file in a master css and take it out of the module. Since I will only be using the module in the way I am (for this site), I'd like to be able to just forego the redo that would be required for me to get this working right.

I found the appropriate line, but no matter what I put in my <head> to call the css, I can't manage to get it to work right. I think it's something to do with the php nature of the css file and the extra options it adds. But even when I do a "view source" on a completed page and copy the generated line into my own <head> section, the css doesn't seem to apply - instead the contacts don't "float" across the page in multiple columns like I want them.

Thoughts on this?

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

More
11 years 10 months ago #1443 by admin
Replied by admin on topic Re: CSS loaded over and over
You may have improper permission rights. If, when using a tool like Firebug, you cannot see properties applied to the elements of the module, this is the problem.
For the elements to float, you have to set the module parameter 'horizontal' and apply the right percentage width. The module has one element per line by default otherwise.
The CSS is created for some part dynamically, so you won't be able to take the CSS out of the module, unless you modify the code extensively to do so.

Olivier.

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