]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/forum/Most_TMPL__95__VAR_variables_are_empty_in_a_template.mdwn
Add ikistrap plugin for ikistrap theme.
[git.ikiwiki.info.git] / doc / forum / Most_TMPL__95__VAR_variables_are_empty_in_a_template.mdwn
1 Ikiwiki version: ikiwiki version 3.20160905~bpo8+1 running on Debian Jessie. 
3 I have a page with directives something like the following: 
5     \[[!edittemplate match="worklog/" template="templates/worklog.tmpl" silent="yes"]]
6     \[[!inline pages="worklog/*" rootpage=worklog postformtext="Record worklog entry for {{$title}}" archive="no" show="0"]]
8 The template `worklog.tmpl` looks something like this: 
9     
10     Time: <TMPL_VAR TIME>
11     Title: <TMPL_VAR TITLE> 
12     MTIME: <TMPL_VAR MTIME>
14 The form to create a worklog renders, and I can click the button. I get the right template. But the rendered template looks something like
16     Time: 2016-09-18T04:57:54Z
17     Title:  
18     MTIME: 
20 In other words: `<TMPL_VAR TIME>` works, and no other `TMPL_VAR` directives do (that I have been able to find). They all seem to be blank. I have been doing some source diving and it looks as if they ought to exist, but nothing is ever rendered. 
22 My long-term goal is to make some custom template variables, but at this point I cannot even get the builtins working, other than `time`. 
24 I am using a bunch of other plugins like `getfield` and `field`, but I do not know if any of them are the culprit. Here is the list from my `ikiwiki.setup` file: 
26           add_plugins => [qw{goodstuff prettydate templatebody
27           template edittemplate httpauth date
28           attachment inline field getfield ymlfront
29           listdirectives sqlite_search sidebar}],
32 What am I doing wrong?