A few weeks back I blogged about wanting to create a module that would simply output the contents of an html file. After watching Will Morgenweck video on how to create a simple one page module in DotNetNuke 5.5 – an awesome feature by the way – I had the idea to do the same thing for the HtmlDirect module. It should be a simple enough module, and it can be done in a single page. So here we go:
This is the workflow I want to use when editing this static html content to be included in my portal:
1. Open my favorite html editor
2. Create a new html file and write some cool / mean / clean html code
3. Reference some special css and js files if I want to
4. Upload it to my site
5. Add the html direct module, point it to the file and that’s it.
Editing is now simply opening the html file, editing it and republishing it. Rinse and repeat
1. Create a new module through the DNN interface
2. Edit the View.ascx file that gets created automatically, to render the file named in the module settings
3. Create an editor to edit the fileName module setting. This must be done in the same page. So I’ll show it when the module is editable, and hide it when it is not.
Here is a video that shows the process, and you can download the source packaged module bellow.