Topic on Extension talk:NamespacePreload

76.173.103.102 (talkcontribs)

The page mentions "The contents of a message defined in this way is then parsed before being shown to the user, so all templates will be expanded. Basically, it behaves like a standard preloaded template."

How can I prevent this? I can't find any information on this page or the linked Manual:Creating pages with preloaded text page.

I'm currently having to replace {{ with { { to prevent it from expanding.

Ostrzyciel (talkcontribs)

Hi! There's no "nice" way to do this, but you can hack around the issue a bit.

First, you will need a template (let's call it Template:Lbraces) with the following content: {{.

Then, in your preload text replace all occurences of {{ with {{Lbraces}}, so instead of {{SomeTemplate}} you would have {{Lbraces}}SomeTemplate}}. That should work for your use case just fine. :)

Lonaowna (talkcontribs)

This is now possible since version 1.2.0 with $wgNamespacePreloadDoExpansion = false (thanks Ostrzyciel!).