Hello,
I have a url template variable with a default value of "none".
For pages with a custom url that I type in this field I want it to display a link with the specified url, however for pages with simply the default value of "none" in the url field I don’t want anything to display.
This is the snippet that decides what to display.
<?php
$cslink = "[+CaseStudy+]";
if($cslink != "none"){
echo '<a href="[+CaseStudy+]">Case Study</a>';
}
elseif($cslink == "none"){
echo "";
}
?>
It works without the elseif statement, however the Case Study link is displayed on all the pages. When I take out the elseif statement then it won’t display anywhere.