Forum:Article Subpage Transclusion

I'm trying to implement a transclusion chain; I thought it was stable (see c:javascript:Window), but now it's breaking on c:javascript:Document.

It's supposed to ask the current page's /genealogy subpage the name of the type's ancestor. Then the same thing is done for that page's /genealogy subpage, and so on until the end of the chain. When the end is reached, the main genealogy template prefixes the chain with "Object > " and outputs all of it in a box like the forum header.

The odd thing is that Node/genealogy only misbehaves when linked by Document/genealogy, and AbstractView/genealogy doesn't when linked by Window/genealogy. I've tried to find the problem in the wiki syntax, but I just don't see anything wrong. Please help... --Jesdisciple (talk) 01:19, 26 October 2008 (UTC)


 * Following the calls :
 * The page Document call Template:Genealogy
 * Then Template:Genealogy call Document/genealogy
 * Then Document/genealogy call Template:Genealogy/internal
 * Then Template:Genealogy/internal call Node/genealogy
 * Then Node/genealogy call Template:Genealogy/internal


 * This thing is really complicated. There's a limit to the number of inclusion you can do but i dont really think you reached it. Someone with better knowledge of the software could tell (like a staff).


 * I think a better way could be the use of parser functions that can work with subpages syntax like #titleparts: and #rel2abs: but i dont know. You're not trying to list the subpages here.


 * Need to think it over... — TulipVorlax 17:17, 26 October 2008 (UTC)


 * Giong by what Vorlax found out, there are two calls to Template:Genealogy/internal . In effect, that template calls itself, and that's the point where MediaWiki puts a stop to your chain. You can probably work around it by creating a redirect to Template:Genealogy/internal and calling that from Node/genealogy. --◄mendel► 05:19, 27 October 2008 (UTC)


 * Oh... Yeah, that is recursive according to a rather loose definition.


 * Would the workaround require a redirect for each genealogy subpage? --Jesdisciple (talk) 05:27, 27 October 2008 (UTC)


 * No, that is recursive according to any definition.
 * Anyway, I've proposed a system that works and avoids the recursion; even if you don't like the particlars, it's probably a good starting point for further improvements.
 * If you have many classes that inherit from Object, you can make a template:object for that to put on the Class ~ page ( should do it), but of course that only works because there is no further recursion. --◄mendel► 07:41, 27 October 2008 (UTC)


 * You've cured me of myopia; thanks a bunch! --Jesdisciple (talk) 00:28, 28 October 2008 (UTC)


 * What is #sub: ? It's not on the help page (on Meta) about parsers functions... — TulipVorlax 17:03, 28 October 2008 (UTC)