Documentation > Tags Reference > is_ancestor

is_ancestor

The is_ancestor tag can be used to find whether or not a folder is the ancestor of another folder.
Outputs '1' if true, else outputs '0'. This makes it possible to use this tag with the conditional if tag.

<cms:if "<cms:is_ancestor parent=folder1 child=folder2 />" >
	..
</cms:if>

Please see Core Concepts - Folders for more info.

Parameters

masterpage

This parameter specifies the template the two folders belong to. If skipped, the template of the executing page is assumed.

parent

The purported parent folder.

child

The child folder.

Variables

It is a self-closing tag and sets no parameters of its own.

Related Tags