Conditional question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tamborinegal
    Member
    • Mar 2005
    • 96
    • 3.5.x

    Conditional question

    I am trying to put different banners in different forums and have been trying this:

    <if condition="in_array($forumid, array(84,67))">ad_1
    <if condition="in_array($forumid, array(85,68))">ad_2
    <else />ad_3
    </if></if>
    I am trying to have ad_3 show in all forums that are not forum 84,67,85 and 68 - but I also want different ads in those sets of forums as well.

    The above doesn't work. Can anyone tell me where I am going wrong.

    Thanks

    Clancy
  • Jose Amaral Rego
    Senior Member
    • Feb 2005
    • 11058
    • 1.1.x

    #2
    You can find basic information in the manual.

    Code:
    <if condition="$my_variable == 1">
        <p>My variable is equal to one.</p>
    <else />
        <if condition="$my_variable == 2">
            <p>My variable is equal to two.</p>
        <else />
            <p>My variable is equal to neither one nor two.</p>
        </if>
    </if>

    Code:
    <if condition="in_array($forumid, array(A,B,C))">
        BANNER ADVERT #1
    <else />
        <if condition="in_array($forumid, array(X,Y,Z))">
            BANNER ADVERT #2
        <else />
            BANNER ADVERT #3
        </if>
    </if>

    Comment

    • tamborinegal
      Member
      • Mar 2005
      • 96
      • 3.5.x

      #3
      Thanks Jose, I did look in the manual and did a search here on the forum as well but I couldn't work out what I was doing wrong.

      Thanks again,

      Clancy

      Comment

      • Jose Amaral Rego
        Senior Member
        • Feb 2005
        • 11058
        • 1.1.x

        #4
        Quick Tips might still have list for these condtional statements, but do not know if the member added which template they can only work in.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...