This file contains 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
@EVAL return $modx->runSnippet('getAside',array("idRessource" =>"147")); |
This file contains 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
$docid = (isset($docid))? $docid: $modx->documentIdentifier; | |
$children= $modx->getActiveChildren($docid, 'menuindex', 'ASC'); | |
if (!$children === false) { | |
$firstChild= $children[0]; | |
$firstChildUrl= $modx->makeUrl($firstChild['id']); | |
} else { | |
$firstChildUrl= $modx->makeUrl($modx->config['site_start']); | |
} | |
return $modx->sendRedirect($firstChildUrl); |
This file contains 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 | |
//[[*Price:mpyfs=`1.196`]] | |
$output = ''; | |
if (!empty($input) && is_numeric($input) && !empty($options) && is_numeric($options)) { | |
/* Multiply & Round the Float to 2 Digits */ | |
$output = round($input * $options, 2); | |
} | |
else |
This file contains 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
<br /><!--MySQL: [^qt^], [^q^] request(s), PHP: [^p^], total: [^t^], document retrieved from [^s^]. --> |
This file contains 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 | |
$modx->regClientCSS('path/to/css/file'); | |
$modx->regClientStartupScript('path/to/js/file'); |
This file contains 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
$current_docid = $modx->resource->get('parent'); | |
$output =''; | |
if($current_docid ==8){ | |
$output = $modx->getChunk('this_chunk'); | |
} | |
elseif($current_docid ==9){ | |
$output = $modx->getChunk('this_chunk'); | |
} |
This file contains 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 | |
$count = 0; | |
$IdAvant=''; | |
$IdApres=''; | |
$position=''; | |
$criteria = array( | |
'parent' => $parent, | |
'deleted' => false, | |
'published' => true, | |
); |
This file contains 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 | |
$stmt = $modx->query("SELECT MAX(id) FROM {$modx->getTableName('modResource')}"); | |
$maxId = (integer) $stmt->fetch(PDO::FETCH_COLUMN); | |
$stmt->closeCursor(); | |
?> |
This file contains 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
function var_dump(obj) { | |
if(typeof obj == "object") { | |
return "Type: "+typeof(obj)+((obj.constructor) ? "\nConstructor: "+obj.constructor : "")+"\nValue: " + obj; | |
} else { | |
return "Type: "+typeof(obj)+"\nValue: "+obj; | |
} | |
} |
This file contains 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
[[*id:is=`1`:then=`[[$chunk1]]`:else=`[[$chunk2]]`]] | |
[[*id:is=`1`:then=`ton code`:else=`ton autre code`]] |
OlderNewer