...
Status | proposal under development |
Issue | |
Original Proposal | |
Target Release | 5.01+ |
Original Authors | Shelan Perera |
...
Which has different template contents.We can define what are the template codes and their required attributes to load them into system.
What are the changes to Theme.xml ?
Following is an extract from Theme.xml
Code Block |
---|
<template action="weblog">
<name>weblog</name>
<description>weblog</description>
<link></link>
<navbar>false</navbar>
<hidden>true</hidden>
<templateCode>
<templateLanguage>velocity</templateLanguage>
<contentType>text/html</contentType>
<contentsFile>weblog.vm</contentsFile>
<type>standard</type>
</templateCode>
<templateCode>
<templateLanguage>velocity</templateLanguage>
<contentType>text/html</contentType>
<contentsFile>weblog-mobile.vm</contentsFile>
<type>mobile</type>
</templateCode>
</template>
|
One should add template code for a standard template and can leave other types (In here mobile template code) not adding.If there is no templateCode entry for mobile type we are cloning the standard's template code.
Major Changes in Roller code
Entry in createDB.vm
Code Block |
---|
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') ); |
In Templates interface
Code Block |
---|
public WeblogTemplateCode getTemplateCode(String type) throws WebloggerException;
|
In WeblogManager interface
Code Block |
---|
public WeblogTemplateCode getTemplateCodeByType(String templateName, String type)
throws WebloggerException ;
public void saveTemplateCode(WeblogTemplateCode templateCode) throws WebloggerException;
|
User Interface for template code editing.
Sample Mobile theme Design Preview in Nook Color.
Home Page
Entry Page
Search Result page
Blog Posts relevant for design
...