MediaWiki: getting content only
HI all,
I'm building web applications with Python/Pylons/jQuery and I've got a help system implemented, but not populated. Each application "page" has a Help link in the footer than open a ColorBox popup with a specific URL to populate it. I'd like to use MediaWiki to supply the Help content, but I don't want the whole MediaWiki interface, just the page contents. I don't the users of the Help system to be able to edit the help pages, just view them. In that way I can create, edit and maintain those pages from MediaWiki and the pages can be displayed in the ColorBox popup.
Does anyone know if this is possible, and if so, can you give me some pointers or references about how to go about doing it? It would be gre开发者_如何学JAVAat if the URL passed to MediaWiky by ColorBox contained enough parameters to tell MediaWiki to suppress the editing interface.
Thanks in advance, Doug
You should make a CSS style page (ie Mediawiki:ContentOnly.css) that has only the content, none of the sidebar, header, footer, title, whatever else you want to remove. Set that as the default. Then make one that only you can access that still has all the edit and navigation options. That way the pop-up will only have the content, but you will still be able edit your wiki normally.
See Mediawiki FAQ for ways to hide everything in CSS
colorbox wraps the popup content in it's own div (#colorbox), so you could just hide the mediawiki editing tools, if they have ids/classes you can target with CSS:
#colorbox .editor { display: none; }
Update: this may also be of interest (from the colorbox page):
ColorBox leverages jQuery's load method for handling ajax. If you are loading a document from the same domain as your current document, you can use a selector pull out just the portion of the document that is needed. Example: $('#example').colorbox({href:"document.html div#content"});
精彩评论