You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Glen Mazza <gl...@gmail.com> on 2014/08/12 13:41:10 UTC

Switch templateCode element to rendition in our theme.xml's?

Hi team, I noticed most all of our themes in roller-extras 
(https://code.google.com/a/apache-extras.org/p/roller-extras/wiki/Themes) have 
an incompatible themes.xml, Roller trunk can't load them in. They need 
to be updated, for example, from the Roller 5.0 and earlier here:

     <template action="weblog">
         <name>weblog</name>
         <description>weblog</description>
         <link></link>
         <navbar>false</navbar>
         <hidden>true</hidden>
         <contentType>text/html</contentType>
         <templateLanguage>velocity</templateLanguage>
         <contentsFile>Weblog.vm</contentsFile>
     </template>

... to the 5.1-style:

     <template action="weblog">
         <name>weblog</name>
         <description>weblog</description>
         <link></link>
         <navbar>false</navbar>
         <hidden>true</hidden>
         <contentType>text/html</contentType>
<templateCode>
             <type>standard</type>
<templateLanguage>velocity</templateLanguage>
             <contentsFile>Weblog.vm</contentsFile>
         </templateCode>
         [<templateCode>
              <type>mobile</type>
              ....
         </templateCode>]
     </template>

As part of updating them, I'm thinking of renaming the <templateCode/> 
element above to <rendition/> as the table storing them has been renamed 
to custom_template_rendition and "renditions" is how they are referred 
to within Roller code.  I think rendition also does a better job of 
clarifying that the renditions are independent of each other, whereas 
templateCodes can be thought of as cumulative, somehow working 
together.  WDYT?

Regards,
Glen


Re: Switch templateCode element to rendition in our theme.xml's?

Posted by Glen Mazza <gl...@gmail.com>.
OK, we've gone from:

          <templateCode>
             <type>standard</type>
             <templateLanguage>velocity</templateLanguage>
             <contentsFile>Weblog.vm</contentsFile>
         </templateCode>

to:

         <rendition [type="standard"|"mobile"]>
             <contentsFile>Weblog.vm</contentsFile>
<templateLanguage>velocity</templateLanguage>
         </rendition>

Type is now an attribute of rendition, like action is of template, with 
a default of "standard" so it needs to be provided only when having 
multiple renditions like the basic-mobile theme.

Glen

On 08/12/2014 07:45 AM, Dave wrote:
> Sounds like a reasonable change.
>
> - Dave
>
>
>
> On Tue, Aug 12, 2014 at 7:41 AM, Glen Mazza <gl...@gmail.com> wrote:
>
>> Hi team, I noticed most all of our themes in roller-extras (
>> https://code.google.com/a/apache-extras.org/p/roller-extras/wiki/Themes)
>> have an incompatible themes.xml, Roller trunk can't load them in. They need
>> to be updated, for example, from the Roller 5.0 and earlier here:
>>
>>      <template action="weblog">
>>          <name>weblog</name>
>>          <description>weblog</description>
>>          <link></link>
>>          <navbar>false</navbar>
>>          <hidden>true</hidden>
>>          <contentType>text/html</contentType>
>>          <templateLanguage>velocity</templateLanguage>
>>          <contentsFile>Weblog.vm</contentsFile>
>>      </template>
>>
>> ... to the 5.1-style:
>>
>>      <template action="weblog">
>>          <name>weblog</name>
>>          <description>weblog</description>
>>          <link></link>
>>          <navbar>false</navbar>
>>          <hidden>true</hidden>
>>          <contentType>text/html</contentType>
>> <templateCode>
>>              <type>standard</type>
>> <templateLanguage>velocity</templateLanguage>
>>              <contentsFile>Weblog.vm</contentsFile>
>>          </templateCode>
>>          [<templateCode>
>>               <type>mobile</type>
>>               ....
>>          </templateCode>]
>>      </template>
>>
>> As part of updating them, I'm thinking of renaming the <templateCode/>
>> element above to <rendition/> as the table storing them has been renamed to
>> custom_template_rendition and "renditions" is how they are referred to
>> within Roller code.  I think rendition also does a better job of clarifying
>> that the renditions are independent of each other, whereas templateCodes
>> can be thought of as cumulative, somehow working together.  WDYT?
>>
>> Regards,
>> Glen
>>
>>


Re: Switch templateCode element to rendition in our theme.xml's?

Posted by Dave <sn...@gmail.com>.
Sounds like a reasonable change.

- Dave



On Tue, Aug 12, 2014 at 7:41 AM, Glen Mazza <gl...@gmail.com> wrote:

> Hi team, I noticed most all of our themes in roller-extras (
> https://code.google.com/a/apache-extras.org/p/roller-extras/wiki/Themes)
> have an incompatible themes.xml, Roller trunk can't load them in. They need
> to be updated, for example, from the Roller 5.0 and earlier here:
>
>     <template action="weblog">
>         <name>weblog</name>
>         <description>weblog</description>
>         <link></link>
>         <navbar>false</navbar>
>         <hidden>true</hidden>
>         <contentType>text/html</contentType>
>         <templateLanguage>velocity</templateLanguage>
>         <contentsFile>Weblog.vm</contentsFile>
>     </template>
>
> ... to the 5.1-style:
>
>     <template action="weblog">
>         <name>weblog</name>
>         <description>weblog</description>
>         <link></link>
>         <navbar>false</navbar>
>         <hidden>true</hidden>
>         <contentType>text/html</contentType>
> <templateCode>
>             <type>standard</type>
> <templateLanguage>velocity</templateLanguage>
>             <contentsFile>Weblog.vm</contentsFile>
>         </templateCode>
>         [<templateCode>
>              <type>mobile</type>
>              ....
>         </templateCode>]
>     </template>
>
> As part of updating them, I'm thinking of renaming the <templateCode/>
> element above to <rendition/> as the table storing them has been renamed to
> custom_template_rendition and "renditions" is how they are referred to
> within Roller code.  I think rendition also does a better job of clarifying
> that the renditions are independent of each other, whereas templateCodes
> can be thought of as cumulative, somehow working together.  WDYT?
>
> Regards,
> Glen
>
>