Admin Forum:Javascript's equivalent to magic words and transclusion

I was wondering if there's any way to transclude pages using javascript, for example, to display a short page into the siderail. That way I can edit the page normally without having to touch the code too many times (the js caching is slow.)

It would also be glad if someone can point me the equivalent to magic words, for example: or  in javascript, I knew there's a list to all the variables somewhere. I'm very new to JS. Any help would be appreciated! -- Mfaizsyahmi  (talk) 21:28, April 7, 2012 (UTC)


 * There is a list of JavaScript variables included with every page that give you lots of useful information - the revision ID (wgCurRevisionId) being one of them. But you will not find a corresponding variable for each and every magic word (and vice versa). The number of articles e.g. is not so easily available. If you've just started to learn JavaScript then I hope you've already figured out that JavaScript runs in the client while all of these magic words are expanded on the server. It's the server that creates and fills all the JavaScript variables you see in the page's source code and it's the server you will have to contact with JavaScript to find out the more elusive stuff. The MediaWiki software provides an extensive API you can query with JavaScript and jQuery provides a handy method to just that end. But this is advanced stuff and I'm not sure it will be of much use to a beginner at JS. In all honesty: I would recommend to start with something much simpler. --
 * I'll lay these advanced topics for later then. Thanks for replying! -- ''Mfaizsyahmi (talk) 12:31, April 11, 2012 (UTC)
 * p.s. Another topic ripe to be sunken to the bottom of the forum.