On Nov 10, 2012, at 1:50 AM, Martin Hewitson <martin.hewit...@aei.mpg.de> wrote:

> Dear list,
> 
> I have an app which is used for compiling agendas. The output is an html page 
> with the agenda formatted in tables, etc. Currently I just build an NSString 
> containing all the html. Clearly this is limited.
> 
> I'd like to extend the app to have templates to allow for different agenda 
> layouts. Currently I'm thinking of some sort of html template with tags in 
> there which I can replace with new html code when building the agenda. My 
> problem is that I don't see how to handle loops. I want these templates to be 
> creatable by the user (if they wish) so there needs to be a way to loop over 
> elements of the agenda and format the result (the user may make a table, or 
> just a list, or whatever they want). 
> 
> Does anyone know of a way to do this, or a better way to approach this 
> problem? I started thinking about trying to write a DSL and use maybe 
> parsekit to handle that. But I've never done that before and it looks a 
> little daunting.


Try GRMustache (https://github.com/groue/GRMustache).

-- 
Ben

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to