Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Automatic class injection mess... wth??Automatic class injection mess... wth??
Previous
 
Next
New Post
6/20/2010 4:41 AM
 
This one blows me away.

Who decided to start automatically injecting class names into every module instance? And worse.. why on earth would they inject the module's unfriendly name and not at least the desired friendly name as applied by portal hosts?

Yes, I appreciate the ability to target modules with styles, but do it with some forethought. My page source is now all full of garbage classes.. it's just a mess.

It gets even worse because of the way it constructs the class using the module developer's silly name plus the word "Content". When a module does not have a name, and this happens when a module is injected using ctl.. i.e. the login, registration, terms, privacy and so on... the resulting class name becomes "Content" which just happens to be a very popular class elsewhere in skinning and is already in use all over the place. Took me a while today to figure out why my skins had all gone bananas.

How can I disable this nightmare?? It is being done in one of the vb files somewhere? I'm looking hard.

Thanks for any advice on this one
Rob
 
New Post
6/20/2010 7:19 AM
 
Just following this up with another demonstration of why this 'feature' was a dumb idea.

As an example, one module is now permanently wrapping itself up with the ridiculous class="Complete Feedback DesignerContent".
Now I have three unwanted classes added around this module. And yes, I already use the class 'Feedback" elsewhere all the time. Now this module is going to pick up styles meant for other modules. I wonder how many more of these I'm going to come across.. many developers use similar names across a range of modules, many use DNN and Dotnetnuke in their names.

Not to mention that older browsers can't always cope with more than two classes per tag.

This needs a host, admin, or even a skin/container-level switch, to either disable it  perhaps to modify the construct. For example, it would be useful if it simply injected the module ID as a class. But I'd still want it gone.

I really need to disable this now.. any advice is very much appreciated
Rob
 
New Post
6/20/2010 7:40 AM
 
Here's anotehr reason to turn it off - Illegal characters - Developer uses an ampersand in the modulesillyname and the page no longer validates, and/or the desired styling fails. The framework really has no place adding this stuff in this manner.
 
New Post
6/20/2010 10:18 AM
 
"The framework really has no place adding this stuff in this manner." I have to STRONGLY agree ;) If extra classes are required they can quite easily be added at anytime by designers, developers or administrators if they are required. Instead of adding extra "DNN crap" to each page we need to remove all the un-needed crap so that DNN can start to produce clean, fast loading pages.
 
New Post
6/20/2010 7:41 PM
 

Exactly.. it's easy to add automatic class injection in skins and I've been doing so all along for unique per-page classes. However, I learned very quickly to never use a construct based on page names, and instead I use the tabID, which is always unique and never illegal.

But yes, the simple truth of the matter is that the application framework should not be inserting anything like this automatically.. It's a decision for skinners to make and apply.

If it turns out there's no means of disabling it, I'll go ahead and put a ticket in with a request.
Regards,
Rob

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...Automatic class injection mess... wth??Automatic class injection mess... wth??


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out