Announcement

Collapse
No announcement yet.

!= false

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • != false

    I"m using the fowlloing in my footer template:

    Code:
    <if condition="$show['sidebar'] != false">
     <!-- Sidebar -->
     <!-- Update -->
     		</td>
     	</tr>
     </table>
     <!-- /Update -->
     		</td>
     	</tr>
     </table>
     <!-- /Sidebar -->
     </if>
    I want to know why the condition statment isn't working. In the file that I don't want that to show in the footer I put this
    $show['sidebar'] = false;
    but I don't know why its not working.

  • #2
    Use :

    <if condition="!show['sidebar']">blahba;h</if>
    Last edited by manguish; Wed 5th Jan '05, 3:00pm.
    For all your minimoto needs : www.minimotoclub.com

    Comment


    • #3
      you cant add php directly to the files, and by default there is no $show['sidebar'] varible.

      Comment


      • #4
        How do I create the variable? I'm not adding it to the file, I added $show['sidebar'] = false; to the a .php file.

        Comment


        • #5
          Sorry, we don't support custom code.

          The conditional for the template is correct:

          <if condition="!show['sidebar']">yourcode</if>
          meaning if the variable is empty .. it will show yourcode.

          Comment


          • #6
            So if I put show['sidebar']=false; it will not show, but if it isn't defined it will show?

            Comment


            • #7
              No.

              show['sidebar'] should be $show['sidebar']

              and the = makes it a 'set this variable value to x' rather then == which means 'the value is is equal to what i match it against'

              If you set it to 'false' in your php code, you should use:

              <if condition="$show['sidebar'] == 'false'">sidebar is false</if>

              and if you don't want it to match

              <if condition="$show['sidebar'] != 'false'">sidebar is not false but has another value</if>

              Comment


              • #8
                Ok thanks for that. Do I have to create the varaible or is it created when I set it, if so where would I create it?

                Comment

                Loading...
                Working...
                X