Monday, January 05, 2009
Register  |  Login



Brillnat Thoughts

Brillnat Thoughts

  No matter how many times you change the wrong file it won’t change the right file  
Location: BlogsBrillnat Thoughts    
Posted by: Michael Jackson 10/9/2006 7:54 AM

A couple of days ago I was putting the final piece on our LocationMap google mapping module.  Now all that is left is the sales and marketing information that will explain how Brillnat it is.  The last feature I put in place was a stylesheet editor. We believe that each module should assist the site implementer in styling their site with the consistent look and feel of their choice.  It is very cool that the DNN gods provided a mechanism for a module.css for each module.  I wonder if it would work to make it possible to have a separate stylesheet for each instance of a module?  There are cases where that would be nice for these very flexible modules that serve a general purpose like the modules found here at Brillnat.com. 

Anyway, back to my LocationMap module.  The module is really made of three interrelated modules.  One is to display the map and the locations on it.  The second is a grid showing a name for each location, and a type or category for each location.  The third of these interrelated modules is a filter dropdown that allows the visitor to the site to filter the data displayed in both the map and grid based on the type/category.  Having these act as separate modules was done to allow the site implementer to easily turn off any they don’t feel are necessary.  This can be done using the standard module settings.  If you just want a map with a single point on it you just make the other two modules visible only to the admins. 

To provide the flexible styling of these modules we have provided css classes at each element of the HTML.   Most DNN sites are styled thru the skin for the site.  To allow the site implementer to integrate our module with the site we have provided a way to use your own class names instead of the ones we provide.  We also expect that you may want to do some styling specific to this module so you can edit the module.css.  In building that feature I made it so that it worked just like the stylesheet editor in the site settings. 

When I first implemented the stylesheet editor I tested until I knew it would open the file, allow me to make changes and bring back the default supplied with the module.  I had to move some files around since my development environment is not what you would end up with a typical module installation.  I then began to check to make sure the module was in fact respecting the changes made to the module.css.  It wasn’t, oh bother.  I initially thought it was error in my css syntax.  I made several changes.  No luck.  I deleted huge portions.  No luck.  I started to get very frustrated.  Then I remembered that my module was running out of a development directory, and I was editing the module.css file out of an installation directory.  You know, no matter how many times you change the wrong file it won’t change the right file.  Brillnat!!!

Permalink |  Trackback

Your name:
Title:
Comment:
Add Comment   Cancel