|
@@ 19-21 (lines=3) @@
|
| 16 |
|
$where = "sc.isfolder=0 AND sc.id!='{$site_start}'"; |
| 17 |
|
$sibl = $modx->getDocumentChildren($_REQUEST['pid'], 1, 0, 'template', $where, 'menuindex', 'ASC', |
| 18 |
|
1); |
| 19 |
|
if (isset($sibl[0]['template']) && $sibl[0]['template'] !== '') { |
| 20 |
|
$default_template = $sibl[0]['template']; |
| 21 |
|
} |
| 22 |
|
} else { |
| 23 |
|
$sibl = $modx->getDocumentChildren($_REQUEST['pid'], 1, 0, 'template', 'isfolder=0', 'menuindex', |
| 24 |
|
'ASC', 1); |
|
@@ 30-32 (lines=3) @@
|
| 27 |
|
} else { |
| 28 |
|
$sibl = $modx->getDocumentChildren($_REQUEST['pid'], 0, 0, 'template', 'isfolder=0', |
| 29 |
|
'menuindex', 'ASC', 1); |
| 30 |
|
if (isset($sibl[0]['template']) && $sibl[0]['template'] !== '') { |
| 31 |
|
$default_template = $sibl[0]['template']; |
| 32 |
|
} |
| 33 |
|
} |
| 34 |
|
} |
| 35 |
|
if (isset($default_template)) { |