mgd_is_in_page_tree

(Midgard 1.4.2 'Bifrost')

mgd_is_in_page_tree -- Check residence within pagetree

Description

bool mgd_is_in_page_tree (int root, int page)

Minimum version: Midgard 1.2.5 (Mad King)

Checks whether the page record with id id resides within the pagetree that starts at the page with id root.

Returns TRUE if successful. Returns FALSE on failure.


<?php
 $root = 13;
 $page = 17;
 echo "Page $page is ", (mgd_is_in_page_tree( $root, $page )) ? '' : 'not';
 echo "in page tree starting at $root.";
?>