League of Legends Wiki

Comments0

Adding Multiple Forum Layers to a Forum

Exiton April 12, 2011 User blog:Exiton

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Ok i am writing this as i just had to figure out how to nest sub forums on our forum. The Help:Forums is just a redirect to the main forums help on the Wikia site so i can't really edit that to add this info.

The forums has 2 types of tables in it. An index table on the index page where links to all the sub forums are listed and a topic table where links to all of the discussion topics are. Topic tables exist in sub forums only. This means standard forums only have 1 nested layer.

  • Index page > Sub Forum > Topic

We wanted to add a sub forum to a sub forum so that we could nest and additional layer. This has been done for the first time on the League of Legends Wiki Issues forum. To produce a structure like this

  • Index page > Sub Forum 1 > Sub Forum 2 > Topic

In order to do this you have to add an index to sub forum 1 linking to sub forum 2. Follow all the steps outlined in the Help:Forums page to create a sub forum with the following changes.

Step 1

Instead of editing Forum:Index one must edit the appropriate Sub Forum 1 you want to add Sub Forum 2 too.

Two tables need to be in this subforum. This first is the standard table containing all the topics. This should already be present and it looks like the table you see in Step 2 when creating a new sub forum page. The second table will contain all of the links to the other sub forums off this fourm. I put it above the Topics table separated by a horizontal ruler. This table may or may not already exist. If it does exist you just need to add the code for a new subforum to the list as you would normally do on the index page after the previous </forum>.

<forum>
namespace=Forum
category=Name of forum
title=Forum:Name of forum
shownamespace=false
addlasteditor=true
</forum>

If it does not exist you need to add a new index table to the sub forum the code for which is below.

----
==='''{{PAGENAME}} Sub Forums'''===
<table class="forumlist" width="100%"><tr><th class="forum_title" align="left">Forum</th><th class="forum_edited" align="left">Last Edit</th><th class="forum_editor" align="left">Last Author</th></tr>
<forum>
namespace=Forum
category=Name of forum
title=Forum:Name of forum
shownamespace=false
addlasteditor=true
</forum>
</table>
----

Step 2

Step 2 is mostly unchanged from step 2 in the help file. Just copy the code as it is written. One modification needs to be made. If you leave the header as it is you will not see the proper nesting. It will look like this. Index page > Sub Forum 2 The link to Sub Forum 1 will be missing. In order to add it you need to edit the header as follows. Change this:

<div class="forumheader">'''Forums:''' [[Forum:Index|Index]] > {{PAGENAME}}</div><br />

Into this where Sub Forum 1 is of course replaced with the proper sub forum name.

<div class="forumheader">'''Forums:''' [[Forum:Index|Index]] > [[Forum:Sub Forum 1|Sub Forum 1]] > {{PAGENAME}}</div><br />

Step 3

Create the template as normal but change the code in the template to

{{SubForumheader|Name of Sub Forum 1|Name of Sub Forum 2}}

 <!-- Please put your content under this paragraph.  Be sure to sign your edits with four tildes ~~~~ -->

The SubForumheader template will create the proper header for the forums however it will only work for one additional level of nesting if you wanted to go Index page > Sub Forum 1 > Sub Forum 2 > Sub Forum 3 > Topic a new SubSubForumheader template wouldhave to be created and then it all gets really confusing.

Also on Fandom

Random Wiki