mgd_is_in_page_tree

Name

mgd_is_in_page_tree -- Check residance within pagetree

Synopsis

bool mgd_is_in_page_tree(int root, int page);

Description

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 successfull. Returns false on failure.

Example

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