Created
August 10, 2017 08:45
-
-
Save OlegShchavelev/e8e2a2d9742f5c21d0a9e084da8c480d to your computer and use it in GitHub Desktop.
Уровень вложенности от id=1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$parentPageId = $modx->resource->get('id'); | |
$level = count($modx->getParentIds($parentPageId)); | |
echo $level; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{'level' | snippet} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment