Item10215: Improve documentation on rendering template macros

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: RenderPlugin
Branches: trunk
Reported By: ArthurClemens
Waiting For:
Last Change By: MichaelDaum
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

 
Topic revision: r5 - 01 Nov 2013, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy