Friday 03 June 2011 2:54:24 am - 4 replies
Modified on Friday 03 June 2011 2:56:18 am by tom riddle
SEBBANE Alexandre
Friday 03 June 2011 3:19:37 am
Hello
can you try without details in your array
i think contains work only with one dimension array...
let us know about this test.
Alex
Paris, France
tom riddle
Friday 03 June 2011 3:47:47 am
Hellocan you try without details in your arrayi think contains work only with one dimension array...let us know about this test. Alex
I tried without details now:
PredefinedPageNodeIds[]=765PredefinedPageNodeIds[]=1288
But it's still not working...
Tom
Marko Žmak
Friday 03 June 2011 3:59:17 am
First check if you have exact values in your variables. Try this:
{$currentNodeId} {$PredefinedPageNodeIds|attribute(show)}
and see what do you get.
Also, the if condition shouldn't be in round brackets, so it should be like this:
{if $PredefinedPageNodeIds|contains($currentNodeId)} doSomehting... {/if}
$PredefinedPageNodeIds
-- Nothing is impossible. Not if you can imagine it! Hubert Farnsworth
Friday 03 June 2011 4:17:27 am
First check if you have exact values in your variables. Try this: {$currentNodeId} {$PredefinedPageNodeIds|attribute(show)}and see what do you get.Also, the if condition shouldn't be in round brackets, so it should be like this: {if $PredefinedPageNodeIds|contains($currentNodeId)} doSomehting... {/if}
Ok, I've checked now:
{$currentNodeId}
767
{$PredefinedPageNodeIds|attribute(show)}
Then I removed the round brackets:
{else if $PredefinedPageNodeIds|contains($currentNodeId)}
But it's still TRUE...
------------------
SOLUTION:
It should be
{elseif $PredefinedPageNodeIds|contains($currentNodeId)}
and NOT
There was a space between if and else...
Many thanks, Tom!
You must be logged in to post messages in this topic!