Last active
August 7, 2017 05:44
-
-
Save bendasvadim/3ce6d90da4c3e34380afa8b54f92048d to your computer and use it in GitHub Desktop.
Получаем данные текущего ресурса по событию OnWebPageInit
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 ($modx->event->name == 'OnWebPageInit') { | |
// Получаем ресурс | |
if (!is_object($modx->resource)) { | |
$modx->resource = $modx->request->getResource($modx->resourceMethod, $modx->resourceIdentifier); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment