home icon contact icon rss icon

Archive for tag Techtips

Designing a Report Discussion Wiki

I was recently tasked with converted a large document into an easily commentable wiki using mediawiki. Here’s how I did it:

Start an article using one or more headers to organize content.

  (article)
  == Header 1 ==
  Content content content.
  == Header 2 ==
  More content.

Mirror the headers in the discussion page

  (discussion)
  == Header 1 ==
  == Header 2 ==

Now, notice that each header in the discussion page has its own edit button. We are going to use this to add an ‘add comment’ link to each header in the article. To do this we’ll have to go pass two arguments to a full weblink: action=edit, and section=(the appropriate section number). The section numbers start with 1 for the first header and increment up. To make this link as generic as possible we’ll use mediawiki variables to construct the link:

Add an ‘Add Comment’ link from the article to the corresponding section of the discussion page

[{{fullurl:Talk:{{PAGENAME}}|action=edit&section=1}} Add Comment]

Add this text wherever you’d like the ‘Add Comment’ link on the article page. I found that after the content of each article works well. So we end up with this:

  (article)
  == Header 1 ==
  Content content content.
[{{fullurl:Talk:{{PAGENAME}}|action=edit&section=1}} Add Comment]
  == Header 2 ==
  More content.
[{{fullurl:Talk:{{PAGENAME}}|action=edit&section=2}} Add Comment]

Now when users click ‘Add Comment’ on the article, they are taken straight to an editing view of the corresponding section of discussion page. Easy!