Is there any write function in the alfresco freemarker node api? I would like to update a document property from a template. If not, is there any way to do this in a template with javascript? As I understand it, alfresco javascript api is not available through a template, but standard javascript is.
The Template API is readonly - for presentation usage. The JavaScript API allows modification of nodes/properties etc. You cannot call the Alfresco JavaScript API from a template at present, however you can execute (and even construct) templates within Alfresco JavaScript. "Standard" javascript as you call it (i assume you mean browser based javascript support) is only "available" in a template because you happen to be displaying it in a web browser, the output from a template can be sent to any destination and can be in theory of any mimetype.