This shows you the differences between two versions of the page.
en:public:developer:template_system:tags:api:set_wwwfile_content [2013/03/08 22:21] admin [Parameters] |
en:public:developer:template_system:tags:api:set_wwwfile_content [2013/04/17 23:06] (current) svanderclock [<#set_wwwfile_content>] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== <#set_wwwfile_content> ====== | ====== <#set_wwwfile_content> ====== | ||
- | Use this function to set the content of a template file | + | 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 ==== | ==== Parameters ==== | ||
+ | |||
+ | Parameters are taken from tag (default) or from HTTP GET/Post | ||
^ Name ^ Mandatory ^ Default ^ Description ^ | ^ Name ^ Mandatory ^ Default ^ Description ^ | ||
| <html><span style="color:#008000">filename</span></html> | Yes | | The filename (related to the root). Ex: /templates/maintemplates/maintemplate.html | | | <html><span style="color:#008000">filename</span></html> | Yes | | The filename (related to the root). Ex: /templates/maintemplates/maintemplate.html | | ||
- | | <html><span style="color:#008000">revert_to</span></html> | No | | Restore content of the file to the given revision | | + | | <html><span style="color:#008000">content</span></html> | Yes | | The content of the file | |
+ | | <html><span style="color:#008000">revertTo</span></html> | No | | Restore content of the file to the given revision | | ||
| <html><span style="color:#008000">output_format</span></html> | No | REST | **JSON** to retrieve response in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Format]] or **REST** to retrieve in [[en:public:developer:template_system:tags:api:REST_Response_Format|REST Format]] | | | <html><span style="color:#008000">output_format</span></html> | No | REST | **JSON** to retrieve response in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Format]] or **REST** to retrieve in [[en:public:developer:template_system:tags:api:REST_Response_Format|REST Format]] | | ||
| <html><span style="color:#008000">jsoncallback</span></html> | No | | Callback function to use in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Response Format]] | | | <html><span style="color:#008000">jsoncallback</span></html> | No | | Callback function to use in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Response Format]] | | ||
Line 15: | Line 18: | ||
^ Code ^ Description ^ | ^ Code ^ Description ^ | ||
| <html><span style="color:#008000">1</span></html> | Insufficient rights. You must be logged as an admin to see logs | | | <html><span style="color:#008000">1</span></html> | Insufficient rights. You must be logged as an admin to see logs | | ||
+ | | <html><span style="color:#008000">103</span></html> | File already exists | | ||
| <html><span style="color:#008000">114</span></html> | File not found | | | <html><span style="color:#008000">114</span></html> | File not found | | ||
- | + | | <html><span style="color:#008000">119</span></html> | Wrong params | | |
- | + | ||
==== Example ==== | ==== Example ==== | ||