Hi!
I have a Ditto ouput filter in a custom Ditto config file.
<?php
$filter='matchingTVvalue,' . $_GET['frompage'] . ',7';
?>
The filter is used for a menu where matchingTVvalue must match the ’frompage’ value which is passed via the URL when coming to the menu page. This works great when clicking a link I have rigged to get to the page containing the menu. If, however, I come to the page from somewhere else, i.e. from a search, no value ’frompage’ is being passed and of course I get a parse error: Empty delimiter
I would like to set a default ’frompage’ value in those cases, but with limited php knowledge can’t get the syntax right:
<?php
$filter='matchingTVvalue,' . if (isset($frompage)) {
$_GET['frompage'];
} else {
$frompage = 56;
}
$_GET['frompage']; . ',7';
?> Sorry for this lousy coding...
(Ditto 2.1, modx 0.9.6.3 on MAMP)