Custom CSS

Oct 2, 2009 at 6:22 AM


I found out the hard way that when you customise jquery.accordion.css, and then do an upgrade you lose it...

Is there a place I can place a customised css so my settings get picked up before default settings.

If there isn't, how about you create a blank custom.css that only gets loaded when you do a fresh install, but not when you do an upgrade.

That way, we can change the look and feel much easier, and if you add stuff to the css later, then we wouldn't have to go through and try an work it all out each upgrade.


Oct 2, 2009 at 8:15 AM

Ouch!!...your not the first to find this out the hard way.

What we do is create our own css file and then list it in the "categorymenucss.includes" settings.  this way the css is never overwritten.  I suppose you could also specify your changes in the portal.css which would then overwrite the default ones. (I've never tried that!).

If I can find the time I'll try and put something the documentation about upgrade to help people in future.


Oct 4, 2009 at 1:42 AM


Put the doco, or where to find it as comments at the start of the jquery.accordion.css etc. That way anyone getting in to change them will see the comments.

What about module.css? What's the best way to manage these?


Oct 4, 2009 at 4:09 AM

Really the correct "DNN way" to handle style changes like this is to put them in the portal.css as Dave mentions. Each portal is meant to have its own styles in there overriding all other stylesheets. The stylesheets in the module folders and eslewhere should ideally be left untouched, and then nothing will ever be lost during upgrades.

However, I do think it would be handy if there were a switch that locked down all the default store files by default so that one has to create duplicates in order to change them. On a related note, I also think that the Templates section in the back office should have the same admin-only switch as the Settings tab items have... there's little need for shop operators to be editing most of them.