[MediaWiki-l] Help making "wgRevisionId" a magic word

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] Help making "wgRevisionId" a magic word

rkevans
Hello .. I'm using Extension:Approved Revisions [1] and I have a need to be able to display the revision ID of the page revision currently being viewed. From the MW Manual page on Javascript [2] I see that the variable "wgRevisionId" contains this information and is exposed to mediawiki for use, but it is not clear to me how to do so. I would like to create a "magic word" [3] called <code>{{VIEWEDREVID}}</code> that outputs the revision ID of the revision being viewed such that it can be used in other parser logic

For example:
<pre>
{{#ifexpr:( {{VIEWEDREVID}} < {{APPROVEDREVID}} )
|if true
|if false
}}
</pre>

Can someone please help me identify the way to make a magic word that contains the value of "wgRevisionId"?

Thank you!
-Rich [[User:revansx]]

[1] https://www.mediawiki.org/wiki/Extension:Approved_Revs
[2] https://www.mediawiki.org/wiki/Manual:Interface/JavaScript
[3] https://www.mediawiki.org/wiki/Help:Magic_words

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l