Thursday, August 18, 2011

Roller WeblogTemplateCode [design]

In our new design we are using WeblogTemplateCode to maintain the information of template content, template language and template type. Following is the complete entry for the database table we are creating make them persistent.


create table rol_templatecode (
    id                 varchar(48)  not null primary key,
    templateid varchar(48) not null,
    template     $db.TEXT_SQL_TYPE not null,
    templatelang varchar(48),
    contenttype  varchar(48),
    #columnNotNullWithDefault('type' 'varchar(16)' 'standard')
);

This design allow us not to deviate from existing roller architecture.We are simply prepare the template using the WeblogTemplateCode for the detected type (standard, mobile etc.) before rendering it to the user.



No comments:

Post a Comment