mgd_is_article_in_topic_tree

(Midgard 1.4.2 'Bifrost')

mgd_is_article_in_topic_tree -- Check location within a topic tree

Description

int mgd_is_article_in_topic_tree (int root, int article)

Minimum version: Midgard 1.1.1

Checks wether the article article is within the topic (sub)tree starting from the root topic with id root.

Returns TRUE if the article is within the topic (sub)tree. Returns FALSE if the article is not within the topic (sub)tree.


<?php
 $root    = 17;
 $article = 13;
 echo "Article $article is ";
 if(!mgd_is_article_in_topic_tree($root, $article)) { echo "not "; }
 echo "in the topic tree below topic $root";
?>