Hi,
> Hi Leon:
> I have tried again according to your suggestion. But it still can not work. I read
>the webmacro document carefully and find the
follow lines in "webmarco/doc/scripts.html":
>
>-----------------------------------------------------------------------------------------
> #parse file
> The #parse directive includes a target file and parses it as though it were part of
>the current template.
> You can use this to include common template code that may be shared among several
>different templates.
>
> Here are some examples:
>
> #parse "C:/webmacro/library/banner.wm"
This is the absolute path.
> #set $library = "C:/webmacro/library"
> #parse "$library/banner.wm"
This also the absolute path.
You need to use the *relative* path from the path set in your *WebMacro.properties*
files. So first locate your WebMacro.properties
file. In this file you will find a setting named TemplatePath. It will look
something like TemplatePath=c:/webmacro/library
Now say for instance you have a file c:/webmacro/library/banner.wm then you need to
call #parse like this:
#parse "banner.wm"
Or if you have a file like this: c:/webmacro/library/banners/banner.wm you need to
call parse like this:
#parse "banners/banner.wm".
> Note that you must normally specify an absolute path to the target. Future versions
>of WebMacro may alleviate this restriction.
>
>-----------------------------------------------------------------------------------------
>
> It said in current version, we have to use absolute path. Have you try this #parse
>function on you PC?
Yes, I use #parse in almost all my WM related work.
>
> Regards&Thanks
>
>
> fanyun
>
>
>
>
>
>
> ----- Original Message -----
> From: "Leon Messerschmidt" <[EMAIL PROTECTED]>
> To: "Turbine" <[EMAIL PROTECTED]>
> Sent: Friday, July 28, 2000 8:48 PM
> Subject: Re: why #parse and #include can not work
>
>
> > Hi
> >
> > > 1. add a line in an exist test.wm file like this:
> > > #parse "/home/test/template/screens/abc.wm"
> > >
> >
> > You need to add the *relative* path. This is path relative from the directory
>specified
> > in your webmacro.properties.
> >
> > ~ Leon
> >
> >
> >
> > ------------------------------------------------------------
> > To subscribe: [EMAIL PROTECTED]
> > To unsubscribe: [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> > Problems?: [EMAIL PROTECTED]
> >
> N?n??~{-:6b~}?'?-??x??~{h:~}{.n??~{-:6b~}?~X~{,7~}
> +???r?y~{*\~}?m?~{pC~} ?V?????)~{^c~}Ib~{2\~}(???~{1J~}&??W~{&2~}:'??x?
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]