https://bugzilla.wikimedia.org/show_bug.cgi?id=835

Bawolff <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5696|0                           |1
        is obsolete|                            |

--- Comment #68 from Bawolff <[email protected]> 2011-12-31 11:42:34 UTC ---
Created attachment 9788
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=9788
Add {{nometa:some templat|arg1|arg2|....}} syntax to disable transcluding
categories and interlanguage links

Hmm, this is difficult to do, since the category/interlanguage links are
expanded after templates are expanded. Maybe the new parser work would make
doing such things easier (I'm not paying attention at all to whats happening
with that stuff, so I have no idea if it'd change things or not).

The best way of implementing this I could think of:
*Save all the interlangs and categories
*Parse the template (in a recursiveTagParse type of way), and put it in the
page at right spot
*Reset the interlangs/categories to the way they were before doing that.

So this patch adds a new parser func that looks more like its modifying the
template call then being an actual parser func. It looks like {{nometa:Some
template|args...}} (I didn't use a hash to make it look like int:, raw:, msgnw:
etc).


Personally I like the name nocat: better, but nometa: is more generic in terms
of applying to interlanguage links too. One minor issue is that it also stops
tracking categories. I also wasn't sure if it should deal with
{{DISPLAYTITLE:}}, {{DEFAULTSORTKEY:...}}, __NOTOC__, etc. As it stands, my
patch lets those types of behaviour switches through.

It feels mildly icky to save and reset parts of the parser output, and I'm
generally just nervous about things that touch the parser (Although this
doesn't directly touch it really), hence I'm posting this as a patch instead of
directly committing. (as an aside, if its decided this approach isn't an
acceptable solution, this can trivially be turned into an extension for those
who really want it).

So, thoughts?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to