roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: using templates which are not in the roller database but on the file system
Date Tue, 26 Aug 2008 13:03:22 GMT
On Wed, Aug 20, 2008 at 12:02 PM, Mullan Colm
<Colm.Mullan@uk.fujitsu.com> wrote:
> Can you tell me where in the java source code, the #includeTemplate
> function on the weblog.vm calls.

The includeTemplate macro looks like this:

#macro(includeTemplate $weblog $pageName)
    #set($pageArg = false)## This is required for such constructs; see
Velocity docs and ROL-689
    #set($pageArg = $weblog.getPageByName($pageName))
    #if ($pageArg)
       #parse($pageArg.id)
    #end
#end

The $weblog object is of type org.apache.roller.weblogger.pojos.Weblog.

Here's some discussion of how to create a page model object for use in
Roller page templates:

   http://markmail.org/message/jdrk5jw4tg2ynkdp

- Dave




>
> Thanks Colm
>
> -----Original Message-----
> From: Mullan Colm
> Sent: 20 August 2008 14:42
> To: user@roller.apache.org
> Subject: RE: using templates which are not in the roller database but on
> the file system
>
> Hi Dave,
> Thanks for the reply.
>
> Could you send an example of a page Model plug-in for starters?
>
> I would like Roller to pull the styles, images, header and footer files
> from a directory. I was wondering if these files could be placed in the
> upload directory, or would the plugin approach be best. I notice there
> is a max size of files to be uploaded currently set to 4 mb, I would
> have to increase this value, plus the fact that it doesn't allow nested
> directories in the upload.dirs. Can we set more that one upload
> directory?
>
> I think the plug-in approach would best suit me. I would greatly
> appreciate if you could send me on a few page model plug-in examples.
> (or a URL to them)
>
> Many Thanks Colm
>
> -----Original Message-----
> From: Dave [mailto:snoopdave@gmail.com]
> Sent: 20 August 2008 14:14
> To: user@roller.apache.org
> Subject: Re: using templates which are not in the roller database but on
> the file system
>
> On Tue, Aug 19, 2008 at 7:10 AM, Mullan Colm
> <Colm.Mullan@uk.fujitsu.com> wrote:
>> I am working on customising roller to be the same style as a website
> and
>> when the web styles change the styles for Roller will change also.
>>
>> Is it possible in Roller to include templates from a file source,
> rather
>> than from Roller database.
>>
>> Instead of #includeTemplate($model.weblog "_header") where _header is
> in the
>> roller database.
>>
>> I would like to include the following file from the file system i.e.
>> \\company-san\inetpub\active\_includes\header.htm
>
> None of the Roller macros or page model objects support that.
>
> If you've got some Java dev expertise, you could write a Page Model
> plugin to do it.
>
> - Dave
>

Mime
View raw message