Topic on Extension talk:Bootstrap

Summary by DesignerThan

With the Extension "HTMLTags" it is possible to allow the a-Tag with specific attributes. As that was added as allowed the tabs worked.

DesignerThan (talkcontribs)

Hi everyone,

does someone know how to create those tabs?

The problem is, that the <a> - Tags are not displayed as Tabs but as HTML-Code, because this tag is not allowed by the MW-Software. On this wiki you can have a look at the issue!

Another Skin called Foreground was able to do that. Maybe someone has an idea.

Thanks, DesignerThan

DesignerThan (talkcontribs)

If I change the <a>-Tags to <span>-Tags, the Tabs show correctly but the JS-Tabs don't work. That would be the other thing to solve. I hope someone knows how to solve that.

Kghbln (talkcontribs)

Have a look at the "HTML Tags" extension to get the <a> tags on board. However only feasible/advisable on closed wikis with trusted users.

I also use this extension on a wiki with Foreground to get accordions going. Currently the server hosting the demo wiki for Forground is down for maintenance so I cannot link right now.

DesignerThan (talkcontribs)

Thanks for the fast answer. I don't know if that is a solution for us, we have a big community. The thing that throws me off is, that the Tabs from the FG-Skin also with <a>-Tags for the tab's actually work.

Kghbln (talkcontribs)

It appears that the "BootstrapComponens" extension does not provide tabs but all the rest.

I have browsed a bit. It seems that people are using "Header Tabs" extension to get tabs on Chameleon which is a bit derp.

Foreground is still using Foundation 5 for that reason. With Foundation 6 this will not longer work. So no upgrade to version 6.

DesignerThan (talkcontribs)

I will have a look at BootstrapComponents as at HTML Tags. Then I will see what happens.

I had a look at the code of Foundation 5 and in the Skin Template file I found the issue why the tabs are working for them. One point is, that you need to activate the feature in the LocalSettings.php, and if that is done they don't use the content output method of MW, they just use echo to output it. That is, I guess, why the <a> tags work in the Foundation Skin.

Thanks for your help so far. We are using the Extension Header Tabs but I would like to get rid of it, don't like the style very much.

DesignerThan (talkcontribs)

After I installed the "HTML Tags" and added the a-Tag with the following code to the allowed Tags and now the tabs work.

$wgHTMLTagsAttributes['a'] = [ 'href', 'class', 'id', 'data-toggle', 'role', 'aria-controls', 'aria-selected' ];

Do I create a threat for the wiki, if I allow the a-Tags with those attributes?

Kghbln (talkcontribs)

Well, you could add everything to a link by allowing the a tag. This is why it is not possible on MediaWiki. You need to trust your users or check everything they do here. If in doubt I would not do it.