Board Thread:Support Requests - Designing Your Wikia/@comment-26156026-20150325153220/@comment-4018164-20150326155212

Well, there are several ways for doing so. When it comes to the main page, where the right rail does not appear, a right rail can be created using column tags, so yo'll need to only declare when you want a right rail to start and end, and insert the wanted content in between its tags.

The rail in other pages, however, is loaded using ajax. It means that as the article or page that you're viewing is loaded, it will take a little extra time for the right rail to be loaded, which means waiting is required before inserting any new content. Here are a few ways for adding new contents:


 * Adding a section to the top of the rail

Since when loaded, the content of the rail is added to the end of the rail, it means that any content that was inserted before the rail's loading will remain on its top. This is good if you're only interested in adding something to the top of the rail. Here's an example:


 * Adding content before/after a specific section

You might want to add your section specifically rlative to one of the default sections. The methods below show how to do that- just for the example, i mentioned how to add content after the "Recent Wiki Activity" section.


 * Checking loading in intervals

This is probably the most common way for inserting content. This one checks if the section you'd like to use as an "anchor" for adding your custom section exists. If that anchor has yet to be loaded, it waits a while, and then checks again.


 * Observers

These timeouts are quite efficient, but personally, i really like observers, since they allow you to insert some new content as soon as a specific section has been inserted, so although it takes more code, it's somewhat more efficient. [click to expand]
 * Observers - when all default sections have loaded

The following observer will execute your code as soon as the right rail has the "loaded" class, which is added to it once all the default content has loaded:.


 * Observers - when a section is inserted

Another type of observer can check whenever a section is inserted. Unlike the "loaded" class, it also allows to check whenever a specific custom section is inserted.