Answer the question
In order to leave comments, you need to log in
How to get parent id in TV?
//пока получилось только id ресурса
@EVAL
$id = $modx->resource->get('id');
return "<SPAN style='color:red'>id ресурса ".$id."</SPAN>";
Answer the question
In order to leave comments, you need to log in
@EVAL
$parent = $modx->getObject('modResource', $modx->resource->get('parent'));
return "<SPAN style='color:red'>id ресурса ".$parent->get('id')."</SPAN>";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question