Topic on Help talk:Extension:ParserFunctions

#ifexist for a "real" article

5
GhostInTheMachine (talkcontribs)

Is there any way to test for the article being a "real" one -- i.e. not being a redirect? ~~~~

Tacsipacsi (talkcontribs)

I don’t think it’s possible using ParserFunctions. However, if you have Scribunto installed (on Wikimedia projects it’s installed), you can use it, as its mw.title objects’ properties include isRedirect.

RobinHood70 (talkcontribs)
Dinoguy1000 (talkcontribs)

That template uses wikipedia:Module:Redirect, which itself uses the isRedirect property. It's a convenient packaging if you're just looking for the functionality and don't want to spend time writing something yourself, but if you aren't able to use Lua modules it won't help you.

RobinHood70 (talkcontribs)

Oh, I didn't look closely enough. I saw other checks there and just figured there was some trickery going on. My mistake.

Reply to "#ifexist for a "real" article"