Announcement

Collapse
No announcement yet.

template conditional

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

  • template conditional

    I'd like to write an "if" conditional that affects only one category and all its numerous subforums. Is it possible to do this based on the parent category, without listing each subforum individually? If so, how?


    Thanks!
    Rebecca


  • #2
    is that a actual command? jk jK ;-).

    I think you can do it my only making affect that catagory number (1, 2, etc.)

    Comment


    • #3
      Say the forumid of the category is 15

      try this:

      <if condition="$forumid == '15'">
      <div> TEST this only shows if category is 15 TEST </div>
      </if>

      Goto a sub forum inside the category and see if it still posts the test text.

      Comment


      • #4
        Thanks for your responses! Unfortunately, the conditional only affects the parent category, and not the child forums.

        My real concern with listing each forum is the ease of updating. I'll need to use the conditional dozens of times, and don't want to pick through and find each instance if I add or delete a forum within the category.

        Any other suggestions?

        Rebecca

        Comment


        • #5
          Originally posted by Floris
          Say the forumid of the category is 15

          try this:

          <if condition="$forumid == '15'">
          <div> TEST this only shows if category is 15 TEST </div>
          </if>

          Goto a sub forum inside the category and see if it still posts the test text.
          There has to be a parent forum variable doesn't there so that the breadcrumb works. So could you not do:

          <if condition="$forumid == '15' OR $parentforumid == '15'">
          <div> TEST this only shows if category is 15 TEST </div>
          </if>

          NOTE: I made up the var name for parent forum so don't expect it to work like that.

          Comment

          Loading...
          Working...
          X