[support] hide menu items without nodes
    michel 
    michel at ziobudda.net
       
    Wed Feb 20 02:39:39 UTC 2008
    
    
  
Seitenweberei.ch ha scritto:
> Is there a module or any code snippet to hide navigation items if the
> corresponing taxonomy term or view doesn't have any nodes assigned? I
> searched but couldn't find any.
>   
One solution may be to test if there are nodes for the termX and after 
display it. (This code is writing without test and only via memory)
<?
if (db_result(db_query("select nid from node where tid = %d limit 
0,1",{here the tid of termX})) == 1) {
    echo "termX of vocabolary Y";
}
?>
Ok, the code is not well performant, but it is a start.
M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20080220/9d69ac5e/attachment.htm 
    
    
More information about the support
mailing list