Hi Greg,

In WeblogWrapper Class ,

public ThemeTemplateWrapper getPageByName(String name)
            throws WebloggerException {
       ThemeTemplate templateToWrap =
this.pojo.getTheme().getTemplateByName(name);

// This will prepare the template with the type.
        prepareTemplate(templateToWrap, type);
        return ThemeTemplateWrapper.wrap(templateToWrap);
    }

we are preparing the template before returning according to the "type"
parameter. In the implementation we did not change the existing velocity
method so used the default ("standard") at that time.

What we need to do to rectify is deprecating existing getPageByName(String
name) and introduce getPageByName(String name, String type); I think in that
case we need to change the method name to a proper one since get page by
name and type.

We can easily introduce these changes with minor changes.

Thanks

On Sun, Sep 18, 2011 at 10:43 PM, Greg Huber <[email protected]> wrote:

> Dave,
>
> I was looking at the code changes and was wondering how
> #includeTemplate(..) macro was going to be implemented.  During the
> parse process it seems to call RollerResourceLoader
> getResourceStream(String name) and in turn looks up the page template
> (but now not the code).  It does not look like there is an easy way to
> get to the render type set in the PageServlet.  Will see if I can find
> an easy solution.
>
> Cheers Greg.
>



-- 
Shelan Perera

Home: http://www.shelan.org
Blog   : http://www.shelanlk.com
Twitter: shelan
skype  :shelan.perera
gtalk   :shelanrc

 I am the master of my fate:
 I am the captain of my soul.
         *invictus*

Reply via email to