We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10357
    • 573 Posts
    Hi,

    I have been trying to reduce my page load times - I have seen pretty good improvements, but I think the IF snippet is a bit of a bottleneck.

    Is there a better way of writing the following?

    <div id="[[If? &subject=`[[*arrowClass]]` &operator=`empty`  &then=`hot-helper-hott` &else=`[[*arrowClass]]`]]" class="helper">


    thanks,
    Gareth
      • 22427
      • 793 Posts
      Try the output modifier ifempty:
      <div id="[[*arrowClass]]:ifempty=`hot-helper-hott`" class="helper">
        • 10357
        • 573 Posts
        thank you. This is what I ending up using:

        <div id="[[*arrowClass:ifempty=`hot-helper-hott`]]" class="helper">
          • 22427
          • 793 Posts
          Of course, that's the correct way.