The situation has gotten a lot more complex!
I don’t want the links in the table on each page to be clickable neither. So I set up a TV which allows me to ask the user a simple Radio Yes||No question, and display the links if neccessary.
$children = $modx->getDocumentChildren($id=$modx->documentObject['id']);
$productaslink = $modx->getTemplateVar($idname='ProductListLink');
if (!empty($children)) {
$output = "<table><caption>" . $modx->documentObject['longtitle'] . "</caption>\n";
$output .= "<tr><th scope=\"col\">Model</th><th scope=\"col\">Description</th></tr>\n";
foreach($children as $child) {
if ($productaslink['value'] == "Yes") {
$output .= "<tr><td><a href=\"[~" . $child['id'] . "~]\"> " . $child['longtitle'] . "</a></td>\n";
$output .= "<td><a href=\"[~" . $child['id'] . "~]\"> " . $child['description'] . "</a></td></tr>\n";
} else if ($productaslink['value'] == "No") {
$output .= "<tr><td>" . $child['longtitle'] . "</td>\n";
$output .= "<td>" . $child['description'] . "</td></tr>\n";
}
}
$output .= "</table>";
return $output;
}
I don’t think that would be possible in NewsListing? I also want to be able to change the title of the columns using TVs as the generated table will represent different items, but the structure will still remain the same. I love this MODx, many solutions to one problem thing! Better than having none at all...
Quote from: Djamoer at Feb 16, 2006, 10:45 AM
(confusing isn’t it
).
You’re right Wendy, it IS confusing.