Jump to content
Worivil

wiki How to create tabs on wiki?

Recommended Posts

How do they make the tabs in the wiki?  I know how to do so using jqurey, but I'm not sure if it requires a specific class that I'm missing or a function that is specific to the wiki.  I only want to use 4 tabs to start out with.  So what exactly is the code you need to use to create a tab on the wiki?

Share this post


Link to post

Hello!

 

Mediawiki only allows a handful of HTML that it can sanitize and no external CSS or scripts. This is why you'll find people using a TON of inline CSS on div/span/table tags. 

 

We have two plugins available for tabs.

 

There's the Mediawiki Headertabs extension which converts headers into tabs.

= tab 1 =
content here
=tab 2 =
content here
=tab 3= 
content here
<headertabs />

We also have the Mediawiki Tabs plugin which is a lot more powerful, but also a bit more complex to set up. Most users using this plugin use the simple default tabs and the toggle box.

<tabs>
<tab name="tab1">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</tab>
<tab name="tab2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</tab>
<tab name="tab3">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</tab>
</tabs>

<!-- don't encapsulate this inside of <tabs></tabs> -->
<tab name="My Toggle Box">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</tab>

 

If you've got questions about either, please let me know! 

Share this post


Link to post

The <tab name="Main"></tab> seems easy enough to understand.  It has a lot of the same functionality as html.  


Also, How do you apply styles to a div class within the wiki?  The normal way to do so within html is either a external style sheet <link rel="stylesheet" href="main.css">, or with a inline style sheet <style > .content {width="70%"} </style>, or within the a <div width="70%"> </div>.  I've already figured out that you can't use inline style sheets on the wiki.  But I dislike doing that same thing 20 times.  

Share this post


Link to post

You'll need to do it completely inline per tag as classes aren't allowed. Part of thisi s because wiki pages are sent through a few different parsers before being stored/retrieved. If you know that something will be consistent, I'd probably wrap the whole thing a <div style=""> tag, which is what many have done. Unfortunately this type of behavior is something mediawiki supports, but does not actually recommend. 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...