Honoring the "exclusion" settings in admin for the directory module
dmclark - June 10, 2005 - 01:34
| Project: | Weblink |
| Version: | 4.6.x-1.x-dev |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
There must be something I'm missing, because I feel dense and there is no prolject page for the directory module.
How can I get only the categories that contain weblinks?

#1
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/directory/
working with 4.6
But i couldn`t force directory.module to show only one vocabulary instead of showing all of them, even there are settings for showing nodes only from one node-type.
Strange module enough.
#2
please file a bug against direcotory module, once that becomes possible. For now anyone can help, by getting the directoy module up and running :)
#3
Well, I finally bit the bullet and tried to make the display exclusion stuff work for the Directory module.
I don't know which CVS to push this out to, or what the process is, so I'll just include the code here and let people play with it.
In the current CVS version of the directory module, look for :
if ($tid == 0) { //Special formatting for the Root level.in the function "directory_display_home_category".
Just befoe the "if ($tid.." statement place:
// Suppress if any node type is in the global
// "directory no_nodes" list (set in "settings")
//
$directory_no_nodes = (array) variable_get("directory_no_nodes");
foreach ($vocabulary->nodes as $anodetype) {
if (in_array($anodetype,$directory_no_nodes)) {
return $output;
}
}
//
// Not in proscribed list, continue
//
Any comments?
Charlie
#4
please provide a real patch (drupal.org/patch)
#5