Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

is_parent_node()

Description

Checks whether a node is parent to other nodes or not

Parameters

ColumnTypeDefaultDescription
$ref integer Node ref

Return

boolean

Location

include/node_functions.php lines 436 to 453

Definition

 
function is_parent_node($ref)
    {
    if(
is_null($ref))
        {
        return 
false;
        }

    
$query "SELECT exists (SELECT ref from node WHERE parent = ?) AS value;";
    
$parameters = array("i",$ref);
    
$parent_exists ps_value($query$parameters0);

    if(
$parent_exists 0)
        {
        return 
true;
        }

    return 
false;
    }

This article was last updated 19th March 2024 06:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.