#
juanwoang
Today I have completed my first module after a few days development. But now I have something new (with me) like to share.
My current module has structure like:
1) /Modules/MyModule/ contains aspx, ascx files
2) /.../Css/ contains stylesheet files
3) /.../Images/ contains images using for my module
But after I change template of the page that my module instance was located in, the look and feel of module become bad because of color, images, icons are not compatible in new selected template. That make me have something change in module and I do following:
4) Create /Modules/MyModule/Templates/ that contains all templates, like /Templates directory of CUY. Its subdirectories are Tpl1, Tpl2...
5) Insert new row into modulesettings table for MyModule, called MODULE_TEMPLATE. Admin must KEY IN the name of template that he like to use for each instance of module.
6) Modify my ascx and module class to read & using value of MODULE_TEMPLATE then register to use. This is the easiest way for me!
But, I think if framework can read /Modules/MyModule/Templates/ folder then using its values to generate a new drop down list for people choose USING_TEMPLATE value in general area, replacing for 6 is much better! Do you think that is good?
My current module has structure like:
1) /Modules/MyModule/ contains aspx, ascx files
2) /.../Css/ contains stylesheet files
3) /.../Images/ contains images using for my module
But after I change template of the page that my module instance was located in, the look and feel of module become bad because of color, images, icons are not compatible in new selected template. That make me have something change in module and I do following:
4) Create /Modules/MyModule/Templates/ that contains all templates, like /Templates directory of CUY. Its subdirectories are Tpl1, Tpl2...
5) Insert new row into modulesettings table for MyModule, called MODULE_TEMPLATE. Admin must KEY IN the name of template that he like to use for each instance of module.
6) Modify my ascx and module class to read & using value of MODULE_TEMPLATE then register to use. This is the easiest way for me!
But, I think if framework can read /Modules/MyModule/Templates/ folder then using its values to generate a new drop down list for people choose USING_TEMPLATE value in general area, replacing for 6 is much better! Do you think that is good?