Products and Services
Graffiti CMS
Learn more about our simple content publishing platform.
Harvest Reporting Server
Get business intelligence tools for measuring online behavior.
Professional Services
Consulting, creative, and Web services from the people who know Community Server best.
Solutions
Telligent
Learn more about our team at Telligent.com.
 

How to use User Controls with Chameleon

Theming in Community Server with Chameleon is centered around regular ASPX pages instead of hundreds of skin files as in Community Server 2.1 and earlier. This makes it easy to find which files to edit if you want to make a theme change, but unfortunately this makes some of the theme pages quite large.

There is a way to get the best of both worlds. All of the new Chameleon controls support inline templates which allow you to control (and override) markup and child controls used. They also allow you to take the inline markup (and child controls) and move them to an external UserControl file.

So here is a quick summary:

  • Copy the contents of a template (ItemTemplate) to a UserControl file. (no code required)
  • Add a reference to your new user control in your ASPX page
  • Add your UserControl as the only control in your template

As an added bonus, you can also optionally add properties to your new UserControls which may help reuse them in other places or simply add a little extra functionality.