Worivil Posted October 30, 2019 Share #1 Posted October 30, 2019 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? Link to comment
Unnamed Mercenary Posted October 30, 2019 Share #2 Posted October 30, 2019 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! Link to comment
Worivil Posted October 30, 2019 Author Share #3 Posted October 30, 2019 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. Link to comment
Unnamed Mercenary Posted October 31, 2019 Share #4 Posted October 31, 2019 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. Link to comment
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now