Topic on Project:Support desk

{{msgnw::test}} read raw NS 0 page via Lua

3
Taylor 49 (talkcontribs)

My module is supposed to read raw wikitext of a page located in namespace 0.

Syntax "{{msgnw::test}}" works somewhat from wikitext. How can I do this from a module?

Function "expandTemplate" fulfills its name and expands a template or even a page in NS 0. How can I seize raw wikitext instead?

Bawolff (talkcontribs)

See the getContent method of Title.

For example:

mw.title.new( "test" ):getContent()

Taylor 49 (talkcontribs)

Thanks ... this looks promising ... I'll test.

Reply to "{{msgnw::test}} read raw NS 0 page via Lua"