views:

23

answers:

1

Hi,

Bit of a vague question. Apologies.

I have a prototype CMS I've been working on for fun. It's completely written in ASP.NET MVC.

It works on the principle of "widgets". Little blocks of functionality that can be dragged and dropped on the page, you get the idea.

I have added a few simple blogging widgets which work well, one of them is the "Latest Posts" widget that goes on the front page. While the function of the widget i.e. listing the latest posts is standard, the mark-up it generates may not be. I don't want to force my users into a set in stone mark-up.

I was wondering if it would be possible to use some form of templating perhaps T4? I have not delved into it deeply but it looks fairly complex, so not sure it would even be possible. What I would like is for the end-user to be able to doctor a small template file to change the markup generated for each blog post list item.

If someone knows of any blogs/tutorials that may get me started I'd be very grateful. Googling for custom T4 templates brings up changes to the EditorFor templates that I'm sure everyone is familiar with.

Thanks,

Ian

A: 

Best idea I've ever seen on this would be to use standard ASP.NET templates and dynamically render them. You don't have to invent a programming language nor tooling and the hard parts are done for you. This perhaps could be easy to do with the new razor view syntax I'd suspect.

Wyatt Barnett