I’m building a page which sets a handful of placeholders within a snippet.
At the very top of the template, a snippet makes a select query and returns the field values as placeholder items.
http://new.rareoopdvds.com/movie?dvd=46&movie=219
a section of the snippet...
$modx->setPlaceHolder('movieTitle', $row['title']);
$modx->setPlaceHolder('movieId', $row['mid']);
$modx->setPlaceHolder('movieDescription', $row['description']);
$modx->setPlaceHolder('movieMpaa', $row['mpaa']);
$modx->setPlaceHolder('moviePrefix', $row['prefix']);
If I use the placeholders in a chunk or right in the template, they work just fine.
However, the data is being displayed depending on which tab is active on the page.
So here I have another snippet which uses a switch to decide which tab gets loaded.
$area = $_GET['area'];
switch($area) {
case "details":
echo $modx->getPlaceholder('dvdDescription');
echo $modx->getChunk('details');
}
The snippet is called from another template which is called with an httprequest object.
file = 'details';
url = "/index.php?id=129&area="+file;
the {{details}} chunk
<strong>Description:</strong><br />
<p>
[+dvdDescription+]
</p>
<p>
testing
</p>
I hope I explained this clearly enough, but my problem is, when the snippet finally gets to load a chunk, the placeholders are not populated any more. How can I maintain their values here? I know its retrieving data because the title & image are form placeholders.