rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: skb on July 25, 2016, 01:56:34 AM

Title: Documentation for item-resource?
Post by: skb on July 25, 2016, 01:56:34 AM
Is there documentation for %item-resource%?

On the list in the forums at http://www.rejetto.com/forum/html-templates/hfs-templates-vars-and-section-help/ , it is mentioned, but with no explanation.

In the docs on the wiki, at http://www.rejetto.com/wiki/index.php?title=HFS:_Template_symbols , it is not mentioned at all.

More generally, what is a simple way to find out the value of various symbols with test code? That is, while I'm trying to figure stuff out, what sample code could I put into, say, an [upload-completed] event handler to show me the values of various symbols for each file?  Can I write stuff to, say, the java script console?

Or, would it be better to use the [upload-success] section for this sort of temporary debug output?

Thanks for clues,
Steve
Title: Re: Documentation for item-resource?
Post by: skb on July 25, 2016, 03:54:54 AM
Nevermind!  :P

After posting I read the recent ticket about "move files after upload", and found Mars' suggestion to use the log for debug output, e.g. add "{.add to log| event upload completed  by %user%.}" to the completed event handler. Works well and easily -- Thanks Mars!!

I used this to print out %item-name%, %item-resource%, and %item-url%. Looks like I can parse the URL to figure out which folder the upload is going to, and the -resource symbol has the windows file path rather than the VFS path.

Any other debugging tips are welcomed!

Steve
Title: Re: Documentation for item-resource?
Post by: rejetto on July 30, 2016, 01:35:09 PM
thanks for reporting, i just added it to the wiki.

to print out variables, without showing them to the final users, you can also put them as HTML comments just by enclosing them in this <!-- strange brackets -->