I have a template that has grown to be over 1200 lines long. I need to bring down the size to make it more maintainable and manageable. The way it works is this.. The template is used to create product pages. Product information is passed to it. So, the template has a number of conditionals based on the product component used to build the page with different html.
I'm thinking that a solution may be to create c# UserControls, pass the data to the usercontrols and build out the html within the usercontrols.
Basically, (if this was .net) I would want to break the template into a number of related class objects for easier maintenance.
What would be the best approach?