Hide unpublished nodes

dsy73 - June 30, 2009 - 17:33
Project:Booktree
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Uccio
Status:closed
Description

Hello,

I would like to hide not published node. I think to add condition here:

<?php
>
    
//now write content only if necessary
     
if (strlen($c) > 2){
     
$content .= "<ul class=\"booktree\">\n". $c. "</ul>\n";
<
?>

But I don't know how is the best to know if a node is published:
- $node=node_load($nid) and $node->status?
or
- SQL query ?

Thanks

#1

Uccio - June 30, 2009 - 19:22
Category:feature request» bug report
Assigned to:Anonymous» Uccio

Thanks dsy73,

I will fix the problem ASAP

Uccio

#2

Uccio - July 4, 2009 - 16:45
Status:active» fixed

#3

dsy73 - July 4, 2009 - 19:28

Thank you

#4

System Message - July 18, 2009 - 19:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.