I'd like to create a module in DNN that, similar to the Announcements control, offers a template that the portal admin can modify for formatting. I have a control that currently uses a Repeater control with templates. Is there a way to override the contents of the repeater ItemTemplate, HeaderTemplate, and FooterTemplate properties?
+1
A:
That are many different ways that you can accomplish this, typically the best/easiest manner is to simply put a literal control in for Header, Footer, and Item templates. Then handle the ItemDataBound event, you can look at the item type and take a specific action on it there to load the needed data.
If you want to see some implementations of this model, you can download the code for my Expandable Text/HTML module, as well as my Guesbook Module both available for free, without login at http://www.iowacomputergurus.com
Mitchel Sellers
2008-09-17 05:34:37
Thanks- this helped me out quite a bit.
Jeff Martin
2008-09-22 15:35:57
+1
A:
You can see examples of templating in the default Starertkit module, the FAQ module, repository module and UDT. All of these have varying levels of control for templating.
Joe Brinkman
2008-09-17 11:56:15