Friday, June 24, 2011

Creating a custom template.

 During the past weeks there were few important mile stones .The first major implementation i had to decide was on how to create a custom template and let the user to render it.I have discussed it in the mailing list and could come up with a method which seems to be convenient and manageable to a user without much trouble. [1]

 The above diagram shows how the custom template creation is going to be handled. When a user logs land on the template creation page he can give the template name (lets say it foo.). And then user clicks on add to add a template to roller.

This will make a roller to create two template pages of types mobile and standard.In that we will assign the default link both the templates as /foo so they are viewable at {baseUrl}/page/foo. So i have modified such that roller can have duplicate templates for a single link but with different types.

Since roller cannot have duplicate templates with single name we are changing the name of the mobile template to "foo.Mobile". But user will not be aware of this action and he will not see such a template in the templates table he sees on the templates page. ( In next post we will let you know how he will be able to edit change mobile version of the template in roller.)

[1]http://www.mail-archive.com/dev@roller.apache.org/msg02470.html

No comments:

Post a Comment