Conditional statement to run java script on multiple selected nodes

  • Thread starter Thread starter faker.king
  • Start date Start date

faker.king

Guest
Member
Hello,

I would like to run a java script header on certain nodes only. I currently use below code.

Code:

Code:
<xf:if is="$containerKey == 'node-55' or $containerKey == 'node-60' or $containerKey == 'node-40' or $containerKey == 'node-47' or $containerKey == 'node-13' ">
    <script       </script>

This code works fine. But wondering how can I reduce the code length by adding the node numbers in an array instead of writing $containerKey variable multiple times

I have tried various ways...

Read more
 
Top