I have just started looking at the Content Rotator and I also had the needed to inject content directly into the skin.
I am pretty sure the way I have done this is proably a little messy, so I would welcome any comments.
The principle behind my change was to allow us to add the Content Rotator control to a skin.ascx, and pass in a module ID as the content rotator you wanted to use.
To do this I created a property in Default.ascx.vb and used this if it were specified throughout the rest of the code. If it was not specified (for example when the module if use in the usual way) then the module continues to work out it's module ID for itself (through me.ModuleID).
After making the changes this is how I now use the Content Rotator:
- Add a CR module to an admin only, hidden page (this is where we will configure the module)
- When editing the content, work out what the module ID is for the CR module (eg look at the URL in the browser - http://dotnetnuke/Testing/Toolbar/tabid/190/ctl/Edit/mid/769/Default.aspx)
- Register a new tag for CR at the top of your skin file:
- Add a tag later in your skin where you would like the Content Rotator to display content:
I hope this makes sense - Scott, am I allowed to post the modified source code / dll to help folks out? |