Hi Lockie,
On 10/11/2010 06:32 AM, Lockie wrote:
Hi all,
I made a form that a user uses to manually list files stored on the local
network drive, that are then displayed in a table. It works fine but to get
the link to be clickable you have to copy/paste the windowsPath macro into
the inline form field.
I am wondering how I can put the variable for the file into the windowsPath
macro so its clickable in the table, like this (only it doesn't work):
...
<td>{{windowsPath share="$formObj.file"
name="Link"/}}</td>
...
This works for me:
----------8<----------
{{velocity}}
#set($path = "C:\path\to\file.txt")
|=Path
|{{windowsPath share="$path" name="file.txt"/}}
{{/velocity}}
---------->8----------
Make sure you save the page that holds the definition of the Windows
Path Macro (XWiki.Windows Path Macro) with a user that has programming
rights.
Hope this helps,
Marius
I've tried a few things out but I'm not really sure on how to get it
working. Do I have to create an entirely new macro?
Thanks,
Lockie