modResource.getTVValue
Последнее обновление not available | История страницы | Улучшить эту страницу | Сообщить о проблеме
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moremodResource.getTVValue¶
Возвращает вывод одной Template Variable для этого ресурса. Имена проходят через парсер, числовые ID идут сразу в модель.
Значение создаётся renderOutput(), поэтому применяются биндинги, модификаторы вывода и отрисовка ТВ. Возвращает null, если ни одна ТВ не подошла под аргумент.
Синтаксис¶
mixed getTVValue ($pk)
-
$pk(mixed) ID ТВ, если значение числовое, иначе имя ТВ
Пример¶
$resource = $modx->getObject('modResource', array('id' => 5));
$byName = $resource->getTVValue('subtitle');
$byId = $resource->getTVValue(12);
Смотрите также¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










