mgd_page_has_children

Name

mgd_page_has_children -- Check if page has children

Synopsis

bool mgd_page_has_children(int id);

Description

Minimum version: Midgard 1.2.5 (Mad King)

Checks whether page records exist that have their up field set to id .

Returns true if the page has children. Returns false if no childred are found.

Example

<?php
 $id = 17;
 echo "Page $id has ", (mgd_page_has_children($id)) ? '' : 'no ', "children";
?>