Use this function to set the content of a template file. When “content” and “reverTo” are not present then a new file will be created
Parameters are taken from tag (default) or from HTTP GET/Post
Name | Mandatory | Default | Description |
---|---|---|---|
filename | Yes | The filename (related to the root). Ex: /templates/maintemplates/maintemplate.html | |
content | Yes | The content of the file | |
revertTo | No | Restore content of the file to the given revision | |
output_format | No | REST | JSON to retrieve response in JSON Format or REST to retrieve in REST Format |
jsoncallback | No | Callback function to use in JSON Response Format |
Code | Description |
---|---|
1 | Insufficient rights. You must be logged as an admin to see logs |
103 | File already exists |
114 | File not found |
119 | Wrong params |
<#set_wwwfile_content filename="/templates/maintemplates/maintemplate.html" content="...">
will output in REST
<rsp stat="ok"></rsp>
And in JSON
{"stat":"ok"}