Item10215: Improve documentation on rendering template macros
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: RenderPlugin
Branches: trunk
Could do with an example. The confusing bit is the word "macro" in the documentation, while in template land these are (more specific) "template macros".
Rendering a template macro
Let's say you have this template macro in a "userview" template:
%TMPL:DEF{"user"}%Hello %WIKIUSERNAME%. <a href='%SCRIPTURLPATH{view}%/%WEB%/%TOPIC%?logout=1' class='logout'>Log out</a>%TMPL:END%
You can get the rendered result with this url:
%SCRIPTURLPATH{"rest"}/RenderPlugin/template?name=userview;skin=%SKIN;expand=user;render=1
--
ArthurClemens - 31 Dec 2010
Another thing: when using AutoViewTemplate, a view template might be named
ProjectViewTemplate
. But using
template?name=ProjectView
won't work, even not
template?name=ProjectView;web=Projects
. You must pass the web name with the template name:
template?name=Projects.ProjectView
.
--
ArthurClemens - 03 Jan 2011