Enable HTML section Send to Sidebar

Topics: Developer Forum, Project Management Forum, User Forum
Mar 7, 2009 at 8:03 PM
Adding an HTML section should support Send to Sidebar.
Mar 13, 2009 at 2:47 AM
I looked into it, the sidebar items are all XML structures (RSS feeds).  Trouble is that the whole flow of data expects an XML format for RSS.  The Sidebar class would have to be reworked significantly to support an HTML snippet.

I implemented a down and dirty version, but the html tags appear in the feed - it's ugly.  That just wasn't the intent of the design.

This is a pretty cool app though, and I'm liking the code I've looked at so far.
Mar 13, 2009 at 4:32 AM
I'm not real fast at this but we should be able to write an over-ridden instance of the Sidebar class that will write an XML CDATA section containing the HTML snippet.

I've also been working with an extension [1]. It has been hellacious to get the HTML formatted the way I need. The deployed example of Working with the extension is embedded into an actual instance of MWPSK and requires many steps to take out of the demo website on the local dev machine and integrated into an existing deployed site.

I'd like to learn to use over-ridden classes more frequently and intend to take more time to consider this option.


[1] 20080802_MWPSKex.#005.zip (12.5 MB)
     http://www.burstmode.de/mwpskex_downloads.aspx
Mar 13, 2009 at 1:08 PM
Edited Mar 13, 2009 at 7:05 PM
The more I looked at it, the more I thought of making Sidebar more generic and expecting the individual content types to provide the proper rendering output.  What I'm thinking is that EasyControls and HTML sections should both have Sidebar capability, and that Sidebar really has nothing to do with RSS.  However, what we're really saying is that we want more control over content layout, and I don't know if there's a better way to approach such an enhancement.

Also, Sidebar.cs is completely responsible for rendering output for all the elements there.  As for overriding classes, look at the ISideBarObject.  The interface requires that you implement a method GetSidebarRss and returns ChannelData.  I implemented that in HtmlContent just to see it, and the application automatically added the "Send to Sidebar" button and fully supported the function.  Problem is the output is HTML of course!  So, either add a method GetSidebarHtml and Sidebar.cs needs to figure out which method to call, or replace GetSidebarRss with something more generic. Overriding Sidebar won't get you there, but maybe renaming the existing class SidebarRSSRenderer, make a new SidebarHTMLRenderer, and then make a new Sidebar class to assemble the output.

Don't know, brand new to this application.  Just throwing ideas out there.  Sorry I didn't have time to review your extension, I'm still getting ramped up on the basics.
Mar 13, 2009 at 3:35 PM
Thanks for passing on your insight Ryan.

DotNetNuke was not built in a day and neither was Rome I hear so sooner or later we Sidebar maniacs are going to make some progress :-)

I'm a big fan of RSS and have been using a 2.0 Wizard control to develop a FEEDgenerator myself. As RSS pertains to MWPSK RSS is somewhat over-used (at least in the UI) and should IMO allow the admin more control to enable or disable the display of the Web feed icon to manage what should and what should not be made available for subscription.

As for the burstmode extension I referred to, you can see how it works in less than 30 minutes if you want as ti does work well and the developer has smartly documented the code with initialized text identifiers. Its just that there's a lot of surface area the code must touch and I've found this common going all the way back to ASP.

I document how to setup support for multiple Web sites in Vista in this blog item [1]. Simply download the extension and follow the directions in the blog. If you are using Vista you can take advantage of IIS7 and the fact that we can now easily have any number of websites on a local dev machine.

I use short names for my local dev machines and for my websites so I can then use a browser to request something like http://mwpsk1 and poof! I get a page. Browsers have gotten so intelligent lately that they no longer require typing the http protocol scheme anymore either so all I need to type into the browser's address bar is mwpsk1 and the web site loads. Its fantastic for design and testing development as I can now keep an instance of IE, FF, Safari and Opera all running at the same time for testing the same pages.


[1] http://tinyurl.com/clpklf