Answer the question
In order to leave comments, you need to log in
How to display a specific object from a resource?
Tell me how to display (get access to data) to the resource object?
Created a resource: Recipes
Resource type: Collection
Created child resources in this resource,
you need to display a specific collection element (recipe) on a certain page.
how to access recipe data via snippet?
$res = $modx->getObject('CollectionContainer',137);
seems to display, but a warning appears in the admin
panel public_html\core\xpdo\om\xpdoobject.class.php : 344) Instantiated a derived class modDocument that is not a subclass of the requested class CollectionContainer
something is wrong...
modx revo
Answer the question
In order to leave comments, you need to log in
Do you need to get the data of some recipe or resource-container "Recipes"?
If the former, then use the usual tools like pdoResources or getResources - after all, the "daughters" of the collections are just resources that are hidden in the tree.
If the latter, then use modResource:$res = $modx->getObject('modResource', 137);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question