-
☆ A M B ☆
- 3,141 Posts
Any reason you’re assigning it as a reference (=&)?
The return value of the getMany method is an array of objects, so you don’t need the reference.
Also, are your TVs actually named "tv1" or "tv2"?
Thanks Jason.
You are right, it’s better (faster) to start from the names of allowed tvs to get the values rather to find and filter the Tvs of the resource.
Otherwise $templateVars =& $resource->getMany(’TemplateVars’); works only if your resource has a template field.
This was the reason why in mys case this didn’t work before.