Working with software developers has a lot of advantages. One is that I always learn something new technology-wise because there is always someone who knows a little trick or has explored something new.

A few days ago, Liz, one of my new co-workers, started using MediaWiki templates to display client system information more elegantly in our internal wiki. I knew we used some shortcuts in our wiki to pull in information from other systems, but I hadn’t associated that with templates and didn’t think I’d be able to create some of these myself.

Now that Liz created this new template for our Koha clients, I looked at her template page and decided to adapt it to our Mahara clients. Taking something existing and adapting it is not as scary as trying to come up with everything yourself. 🙂

Fortunately, I could use most of the items she had in her template, and I only read the MediaWiki templates page trying to understand a bit more. To be honest though, it was easier trying to work out what Liz had done than following the page. Besides, the template that she had created produced a table.

The current template that can still be tweaked over time is:

{{TemplateDoc}}[[Category: Templates]]

{| style="border: thin solid #a0a0d0;"
{{ #if: {{{SystemName|}}} |
      {{!}} colspan="3" {{!}} '''{{{SystemName|}}}'''
      {{!}}-
}}
| Client name
| colspan="2" | {{{Client|TBA}}}
|-
| Production URL
| colspan="2" | {{{ProductionURL|TBA}}}
|-
| Staging URL
| colspan="2" | {{{StagingURL|TBA}}}
|-
| Testing URL
| colspan="2" | {{{TestingURL|TBA}}}
|-
| Design URL
| colspan="2" | {{{DesignURL|TBA}}}
|-
| Connection information
| colspan="2" | {{{ConnectionInfo|TBA}}}
|-
| System classification
| colspan="2" | {{{Classification|TBA}}}
|-
| Mahara version
| colspan="2" | {{{MaharaVersion|TBA}}}
|-
| Git branch
| colspan="2" | [{{{url|http://URLtotheGitRepository{{{GitBranch|TBA}}}}}} {{{GitBranch|TBA}}}]
|-
{{ #if: {{{Author}}} |
      {{!}} Last edited by
      {{!}} colspan="2" {{!}} {{{Author|}}}
      {{!}}-
}}
| Added date
| colspan="2" | {{{Date|TBA}}}
|-
| Client status
| colspan="2" | {{ #if: {{{Status|}}} | {{{Status}}} | DRAFT }}
|-
  {{ #if: {{{Multitenanted}}} |
      {{!}}
      {{!}} Multitenanted Mahara?
      {{!}} {{{Multitenanted|}}}
      {{!}}-
  }}
  {{ #if: {{{Theme}}} |
      {{!}}
      {{!}} Custom theme?
      {{!}} {{{Theme|}}}
      {{!}}-
  }}
  {{ #if: {{{Customization}}} |
      {{!}}
      {{!}} Are there any customizations?
      {{!}} {{{Customization|}}}
      {{!}}-
  }}
  |
  | Is there anything else worth mentioning?
  | {{{TodoOptional|TBA}}}
  |-
|}

When using it in a page, all I need to copy now is:

{{ MaharaSystem |
     SystemName=Client Mahara |
     Client=Client name |
     ProductionURL=http://|
     StagingURL=http://|
     TestingURL=http://|
     DesignURL=http://|
     ConnectionInfo= VPN, Internet, Local, Other |
     Classification=Hosted, Self Hosted |
     MaharaVersion=version number |
     GitBranch=|
     Author=~~~ |
     Date=~~~~~ |
     Status=Setup, Live |
     Multitenanted=Yes, No |
     Theme=Yes, No |
     Customization=Short name for customization|
     TodoOptional= |
}}

That produces the following tabe:

Wiki template result
Et voilà. Done.

It would even be better if I could collect all the information I put onto individual wiki pages using that template on one combined one so I see everything on an overview page. I think Semantic MediaWiki might be able to help there because what I want to do is aggregate information found on one wiki page on another without having to enter the information twice. I’ll check with a colleague who is more knowledgable about that if that were the case or if there is another way of doing that in our current MediaWiki implementation.

CC BY-SA 4.0 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Leave a Reply

Your email address will not be published. Required fields are marked *