I set this module up a few times under different circumstances to try and find a workable solution, but when I'd finally worked out what I wanted, I didn't seem to be able to get it to work!

I would ideally like a front page which acts as a "parent" for the rest of my content, but I don't think any actual relationship is necessary - I have a "section" content type which I can use as a parent for each site section, and then order/create nodes in each as I see fit (as I understand it).

I had initially set up the site to have the front page as parent to all my section pages, and this worked ok, I had a list of my sections (created by the built in "child list" view) on my front page. I had also set up some child pages on my sections and these initially worked fine as well.

I hit some problems though. Firstly, by using a "home" page as a parent, I ended up with a breadcrumb that said "home > home > whatever", which I couldn't sort out even in template.php with code trickery. Secondly, because of this, I deleted all the nodes, emptied the nodehierarchy db tables, and tried again, using my eventual strategy of just have section pages as parents, and using a view in each for their children only.

This, I assumed, would work - however, it all went rather strange instead. No matter how many times I recreated my nodes, emptied tables etc, I could not get the relationships to work. I have also tried uninstalling and reinstalling the modules.

What happens is, I create a blog section page, and I have the section type set up to "be parent". I create a blog (instance) type page, and set that to have a parent of the blog section page. This is as per the README docs. Menus are set to auto generate, and I have defaulted the blog type pages to use the blog section page also.

However, when I enable the nodehierarchy_child_list view in the blog section page, nothing happens. No children are displayed. Also the parent menu item denotes that it has children, but does not expand. If I click on the "children" tab, there are clearly children there, but if I click on one of these, I get the page up, and the child menus now appear, but I get views errors, and very odd numbers in my custom_pagers block.

All in all, I'm very confused. It worked initially, but I don't know what else I can do now, short of scrapping the site... :(

Comments

niklp’s picture

Um, I guess what I should have added is, is there some way to COMPLETELY refresh this? I have no idea what's happening. I tried it on a fresh install and it works just fine...

niklp’s picture

Title: Token required for custom_pagers, etc. » Arbitrarily stopped working...?
Component: Code » Miscellaneous
Category: support » bug

Sorry, double post.

niklp’s picture

Title: Arbitrarily stopped working...? » Token required for custom_pagers, etc.
Component: Miscellaneous » Code
Category: bug » support

Hmmm. I got the menus working again, but I don't know how...

I think the views errors above are caused by custom_pagers.module. If I assign the nodehierarchy_child_list view to a custom_pager, this doesn't work. It requires a token of [parent-nid] or something similar.

You can make the custom_pager module work thus:

- (if we have a blog section page and blog content type)
- assign several blog pages to the blog section via the parent/child mechanism
- enable the nodehierarchy_child_list view
- set the parent node's view to nodehierarchy_child_list
- create a new custom_pager, assign it to the blog content type
- set the view type in the pager to nodehierarchy_child_list
- add the parent nid in the view arg box *manually* <-- this is obviously where the token would be useful.

ronan’s picture

Title: Arbitrarily stopped working...? » Token required for custom_pagers, etc.
Component: Miscellaneous » Code
Category: bug » support
Status: Active » Closed (duplicate)

Thanks for all the info, and for all you've done tracking down the issue.

I have split this part:

I hit some problems though. Firstly, by using a "home" page as a parent, I ended up with a breadcrumb that said "home > home > whatever", which I couldn't sort out even in template.php with code trickery. Secondly, because of this, I deleted all the nodes, emptied the nodehierarchy db tables, and tried again, using my eventual strategy of just have section pages as parents, and using a view in each for their children only.

Into a bug report of it's own right:
http://drupal.org/node/190168

Thanks for spotting it.

I've also consolidated this report and the Pathauto one to one:
http://drupal.org/node/190166

as they both seem to be an issue with Token module support. This'll help me keep track of this issue more easily.

Thanks again for your hard work
Ronan