if (isset($fields['tvValues'])) { foreach($fields['tvValues'] as $tvName => $value) { $resource->setTVValue($tvName, $value); } }
if (isset($fields['tvValues'])) { foreach($fields['tvValues'] as $tvName => $value) { $get_resource = $modx->getObject('modResource', array('pagetitle' => $value)); $get_id->get($get_resource=>'id'); $resource->setTVValue($tvName, $get_id); } }
This question has been answered by BobRay. See the first response.
I answered in the other thread, but missed the part about using IDs of other newly created resources.
Just add 'default' in the resolvers section of the project config and run Bootstrap and you'll get a resolver called packageName.resolver.php which will run after all the objects are installed. Your second code section looks right to me.
I answered in the other thread, but missed the part about using IDs of other newly created resources.
Just add 'default' in the resolvers section of the project config and run Bootstrap and you'll get a resolver called packageName.resolver.php which will run after all the objects are installed. Your second code section looks right to me.
I'm not sure that's possible. Did you try setting their templates to empty in the Manager and running ExportObjects?
If that doesn't work, you could always set them to 0 in the default resolver.
<html> <head></head> <body> [[*content]] </body> </html>
And I tried to set the template to 0 in the resolver.
And I tried to set the template to 0 in the resolver.
Which resolver?
And what code did you use?