On my page I’ve got two links
Previous Offer | Next Offer
that are generated with the following code:
{exp:channel:prev_entry channel="offers"}
<a href="http://{path=%27offers/article%27}" title="Previous Offer | {title}">PREVIOUS OFFER</a>
{/exp:channel:prev_entry}
|
{exp:channel:next_entry channel="offers"}
<a href="http://{path=%27offers/article%27}" title="Next Offer | {title}">NEXT OFFER</a>
{/exp:channel:next_entry}What I’m trying to do is get the pipe | to not appear if on the first or last entry. To do this I’ve set up two snippets
{prev}
with the code for the previous link
and {next}
with the code for the next link
I then tried a number of conditionals around the pipe | but I keep getting the following error
Parse error: syntax error, unexpected ‘<’ in /var/www/vhosts/wavecrestresorts.com/httpdocs/wavesys/expressionengine/libraries/Functions.php(656) : eval()‘d code on line 51
code looks like this and a couple of other variations
{if "{next}" !='' AND "{prev}" !=''}|{/if}If I put single quotes around {next} and {prev} the page renders without an error but the pipe | displays even when there is only one of prev/next links.
Any thoughts?