简体   繁体   中英

How to make “dual contents view” by custom MediaWiki skin

I'm building a custom mediawiki skin for 'dual contents view' trying to show another wiki content on the right panel as 'Second Content'.

A concept is the following.

(1) If a user click a specific 'word', (2) a linked wiki page will be displayed on the second content panel.

First part (1) seems easier, putting a custom tag which make special a href tag would be a solution.

However part (2), I could not find a solution. ( Considering both div(with Ajax if it is possible) or iframe. )

I've selected a base skin with 'monobook' since it is easier to customize by fixing MonoBookTemplete.php and main.css.

If I use the following, the second panel synchronizes with the main panel while viewing or editing the content. Of course to display another wiki text, this is not a solution...

<?php $this->html( 'bodytext' ) ?> 

Could you give me some hints - which method/functions can be used to make it?

If the second wiki allows it, you can use the Mediawiki API ( http://www.mediawiki.org/wiki/API:Main_page ). This will let you get content with an Ajax request.

Since this is a cross-site request, you'll need to look at how the API handles those.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM