Hey all,
Just getting into xPDO with modX. I have a template that includes a snippet where I add my package and get a record from the database. I can display the record. So far so good.
Later in the page I want to use a second snippet to display another field from the record. So it looks like this
[[!connect]]
<some HTML>
[[!display_more_data]]
<more HTML>
In my second snippet I have identical debug code as the first one (which works)
echo " song = " . $song->get('songArtist');exit; But it fails with
Fatal error: Call to a member function get() on a non-object in
Do I need to do the getObject() in each snippet? It looks like it but I want to be sure. It seems like that would be a waste of resources, or is the object already created and I am just pulling it in again?
Hope that is clear. Thanks in advance