Theming functions can display grandparents / grandchildren, in which case $arguments may not have the proper parent_nid exposed in the URL.

CommentFileSizeAuthor
nh_grandchildren.patch1.03 KBdgorton

Comments

scottrigby’s picture

How does this patch allow the display of grandparents / grandchildren? :) Scott

dgorton’s picture

Right - that was a very obtuse description, wasn't it? It was somewhat written for ronan, as he's familiar with the issue - this snippet of code has been in-and-out of different versions of the module.

So, here's an attempt at a better one - it may be a bit off, though as it's based on memory as I'm writing from Drupalcon

This patch very specifically is in support of a somewhat rare situation - where the theme layer is loading and displaying grandchildren.

An example is here: http://www.productivecorp.com/about-us#childtab-3. The 'About' page loads it's children and displays them as tabs. The Staff page/tab gets it's contents from it's children -- so, when the About page loads it's children to display them, it also need to load it's grand-children to display the contents of the Staff tab. The URL in this case (and therefore arguments) don't include the nid of the parent (the Staff page), which means that the Staff page's children won't load.

So, this patch replaces that argument with the parent->nid. In 99.9% of cases, this will be the same thing, but in this particular case, they're different.

Sorry for the bad initial description!

dgorton’s picture

Status: Needs review » Closed (fixed)

Very old feature for very old code. Closing