Possible to display prev/next navigation below file attachments tables?
Zach Harkey - April 21, 2006 - 20:00
| Project: | Category |
| Version: | HEAD |
| Component: | Category_display |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
If I attach files to a category node (using the upload module), the attachments table is displayed after the prev/next navigation. This feels wrong since the attachments are part of the actual category node. Is there a way to change this?

#1
The category_display navigation elements get appended to the node's body through the same mechanism as the upload file table: that is, through the 'view' operation in
hook_nodeapi().Drupal calls all hooks in alphabetical order of module name, which is why the category stuff appears before the upload stuff. The only way to change this is by changing the 'weight' field for a module in the 'system' table of your site's database (currently no interface for this - you have to do it manually using a DB tool, such as phpMyAdmin).
So if you give the upload module a lighter weight than category (and then emptying your cache would be a good idea), this should fix the problem. I can't think of any other way to fix it, I'm afraid.
#2
Hey, I just thought of one other approach you could take: you could try overriding the default behaviour at the theme level. You could create a
mytheme_category_view()function which returns an empty string '' all the time, thus removing the category stuff from its usual position on a node page (and removing it altogether, for that matter).You could then create another function, called something like
mytheme_category_view_custom(), which is exactly the same as the originaltheme_category_view()function. Then, create anode-category_cat.tpl.phpandnode-category_cont.tpl.phpfile, and calltheme('category_view_custom', $node)at the spot of your choosing in these templates (or, even better, assign a variable with the output of this function, using a custommytheme_node()function in yourtemplate.phpfile).I haven't actually tried any of this, but if it works, it would let you fix the problem without touching your database, and without hacking Drupal core or the category module. The custom changes would only be in your theme (which is where most custom changes belong).
#3
Oops - meant
node-category-cat.tpl.phpandnode-category-cont.tpl.phpin my post above.#4
3 years old support request in unlikely to attract any attention... Also it was 4.7.x. Closing.