Hi Maxime,
On Mar 1, 2012, at 11:53 AM, Maxime Sinclair wrote:
Thanks a lot Guillaume for your quick answer.
When I run the snippet on my xwiki farm, the link is invalid:
http://<server>/bin/create/Space//bin/edit/Space/Doc?template=Sapce.MyTemplate
The trick I found (to keep it in the archive):
#set($myURL = $xwiki.getURL("Space.Doc", "create",
"template=Space.MyTemplate"))
{{html}}<a href="$myURL">Create Space Doc</a>{{/html}}
Don't use the HTML macro that's bad…
Instead use XWiki Syntax 2.1 and:
[[label>>path:<relativepathhere>]]
Thanks
-Vincent
Maxime
2012/2/29 Guillaume Lerouge <guillaume(a)xwiki.com>om>:
> Hi Maxime,
>
> something like this maybe:
>
> #set($myURL = $xwiki.getURL("Space.Doc", "edit",
> "template=Space.MyTemplate"))
>
> [[Create Space Doc>>$myURL]]
>
> Guillaume
>
> On Wed, Feb 29, 2012 at 6:22 PM, Maxime Sinclair
> <maxime.sinclair(a)gmail.com>wrote;wrote:
>
>> Hi XWiki Users,
>>
>> I have defined a template page and the associated termplate provider.
>> All is functional: the template selection popup shows up when a new
>> page is created.
>> Now, I try to build a link (using Velocity) that will create a new
>> page from the template. Any idea ?
>>
>> Regards,
>> Maxime