Closed Bug 589027 Opened 15 years ago Closed 15 years ago

Hook to use a template in a wiki article

Categories

(support.mozilla.org :: Knowledge Base Software, task, P1)

Tracking

(Not tracked)

VERIFIED FIXED

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.
I believe the MediaWiki syntax for variable substitution in templates is: {{{1}}} is a numbered argument and {{{kwarg}}} is a named argument.
Blocks: 596051
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
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]]
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
* 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.
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.