Topic on Project:Support desk

-sche (talkcontribs)

Over at the English Wiktionary, we're trying to figure out what the prefix "raw:" does. It was used in certain old templates, such as Template:slink, and was therefore recently copied into the major Template:head (diff / example of use)... but no-one remembers what it does. Obviously, using code without knowing what it does is suboptimal... can you enlighten us as to what it does, so we can decide if it's necessary? Feel free to reply here or post a note to Template talk:head.

If I'm not asking this question in the right forum, I'm sorry and I'd be obliged if you could direct me to a better forum.

MarkAHershberger (talkcontribs)

I just asked on IRC and bawolff and Matma Rex clued me in. Here is a mashed-together transcript of what they said:

raw: shows the wikitext of page you're transcluding as if you wrapped the page being transcluded in <nowiki/< If you have scary interwiki transclude, it causes the wikitext to be transcluded from the foreign wiki, and interpreted as if it was parsed locally, as opposed to default behaviour of just transcluding the html (action=render) output.

In the example you linked to, it looks like this functionality is being used to tag pages with a raw link in their text into the Category "head with raw link".

Thnidu (talkcontribs)

Do you mean

as if you wrapped the page being transcluded in <nowiki/>

?

Krinkle (talkcontribs)

That description doesn't seem to be accurate. See below, interacting with Template:Example and comparing output to msgnw ("message nowiki", presumably from the time that templates were messages).

"raw:" doesn't appear to do anything special. It honours noinclude, processes parameters and transcludes the parsed/rendered html.

Input:

{{Example|X}}
----
{{raw:Template:Example|X}}
----
{{msgnw:Template:Example|X}}

Output:

X


X


<span style="color:#999;">{{{1}}}</span><noinclude> * See also: {{tl|s}} [[Category:Formatting templates|{{PAGENAME}}]] <templatedata> { "description": "Display text in gray", "params": { "1": { "label": "Text", "description": "Text to be displayed", "type": "string", "default": "text", "suggested": true, "autovalue": "value" } } } </templatedata> </noinclude>

Reply to "What does "raw:" do?"