Closed
Bug 589027
Opened 14 years ago
Closed 14 years ago
Hook to use a template in a wiki article
Categories
(support.mozilla.org :: Knowledge Base Software, task, P1)
support.mozilla.org
Knowledge Base Software
Tracking
(Not tracked)
VERIFIED
FIXED
2.3
People
(Reporter: paulc, Assigned: paulc)
References
Details
We need to allow template hooks. Syntax: [[Template:Template name|arg_1=value_1|...|arg_n=value_n]] This just turns above syntax with the processed template, substituting the arguments for "%s" or "%(arg_1)s"-like substrings.
Comment 1•14 years ago
|
||
I believe the MediaWiki syntax for variable substitution in templates is: {{{1}}} is a numbered argument and {{{kwarg}}} is a named argument.
Assignee | ||
Comment 2•14 years ago
|
||
http://github.com/jsocol/kitsune/commit/b36fe8e3626d9c46b80875786a66543231fcd9e5
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 3•14 years ago
|
||
Here's an example to test: --- Template:testme -- Some text. {{{depends}}} Other text --- Then you can include this template in a wiki document, like so: [[Template:testme|depends=Yay, inserting an argument]]
Comment 4•14 years ago
|
||
I followed the steps and created the test-template, gave it category 'templates' and approved the revision: https://master.support.mozilla.com/en-US/kb/test-template I included it in a new article and it says the template doesn't exist or has no approved revision: https://master.support.mozilla.com/en-US/kb/funkadelic
Comment 5•14 years ago
|
||
* Use the title, not the slug, in the [[Template:<>]] tag. (eg [[Template:test template]]) * To be a template, the article title must start with "Template:". (eg "Template:test template".) Slug is irrelevant. After fixing these issues, the above worked as expected, for me.
Comment 6•14 years ago
|
||
Verified all works as expected with the title and not the slug
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•