I have a frustrating problem.
I have 4 pages and each page has a link to the same page but with an id in the link.
example:
<a href="www.test.com/index.php?id=20&v=2">test</a>
At the id 20 page I have this snippet:
<?php
if(isset($_GET['v'])) {
$page = $_GET['v'];
if($page == "1"){
echo "<a href=\"http://www.x.nl/1\" id=\"afspreken2\">test</a>";
} else if ($page == "2"){
echo "<a href=\"http://www.x.nl/2\" id=\"afspreken2\" >test</a>";
} else if ($page == "3"){
echo "<a href=\"http://www.x.nl/3\" id=\"afspreken2\">test</a>";
} else if ($page == "4"){
echo "<a href=\"http://www.x.nl/4\" id=\"afspreken2\">test</a>";
}
} else {
echo "<a href=\"http://www.x.nl/99\">test</a>";
}
?>
But this doesn’t work somehow...
However if i paste the script in a new page outside of modx, it works.
Somehow modx blocks it?