novalis: (Default)
([personal profile] novalis Jan. 21st, 2009 02:01 pm)
We use Mediawiki to manage our recipes, and we highly recommend it. As we've cooked increasingly complicated dishes, we've started to change the way we organize our wiki. We now have recipes which are composed of subrecipes using a template that some people on #mediawiki helped me put together. When I was putting together the prep list for this Saturday's dinner, I noticed that I couldn't do this recursively. A bit of googling later, and I came to the solution:

You'll need the ParserFunctions extension. You may need to copy in a bunch of subsidiary templates from wikipedia.

Create a template called Template:Component1 with the following content:

-->{{#ifeq:μ|<!--**DEFINED BUT EMPTY**-->

--><div id="template_doc_page_transcluded" class="dablink plainlinks"><!--
-->{{#ifexist: {{{1}}}
|<!--**/doc EXISTS**-->This component is [[Wikipedia:Transclusion|transcluded]] from [[{{{1}}}]]. <small style="font-style: normal">([{{fullurl:{{{1}}}|action=edit}} edit])</small><br />

{{#if:|{{{content}}}|{{#ifexist:{{{1}}} | {{ :{{{1}}} }} }}}}
<div style="clear: both;"></div>

Then create a template called Template:Component, which just redirects to Component1.
#redirect [[Template:Component1]]

Then, to include a recipe in another recipe, say: {{Component|subrecipe page name}}.
Identity URL: 
Account name:
If you don't have an account you can create one now.
HTML doesn't work in the subject.


Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.


novalis: (Default)
Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags