Created
January 2, 2016 15:34
-
-
Save zhabinka/92300efd36e1f5de0f00 to your computer and use it in GitHub Desktop.
Изменение TV-параметров через сниппет.
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 | |
if ($views = $modx->resource->getTVValue(3)) { | |
$views++; | |
} else { | |
$views = 1; | |
} | |
$modx->resource->setTVValue(3,$views); | |
return $views; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment