Created
September 26, 2016 20:42
-
-
Save Burick/d0598f926e768ca39f69cca6748b48ea to your computer and use it in GitHub Desktop.
Если есть дети то возвращает стрелку сниппет для ево
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 | |
if(!isset($parent))$parent=$modx->documentObject['id'] ; | |
$table_name = $modx->db->config['table_prefix'].'site_content'; | |
$result = $modx->db->query( "SELECT COUNT(*) FROM $table_name WHERE parent='".$parent."' AND published='1' AND hidemenu='0'" ); | |
$total_rows = $modx->db->getRow( $result ); | |
if( $total_rows["COUNT(*)"] != 0) | |
return ' →'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment