mgd_page_has_children

(Midgard 1.4.2 'Bifrost')

mgd_page_has_children -- Check if page has children

Description

bool mgd_page_has_children (int id)

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.


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