HTML loop using ePages back office

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wallyzebon
    New Member
    • Jan 2007
    • 4

    HTML loop using ePages back office

    I'm struggling to debug a simple loop in ePages back office. My knowledge of HTML is all self taught, copying and pasting bits of code from here and there, so I'm not too up on the finer points, but I'm not too bad.

    This piece of code should show a list of items in three columns, but it is only showing a single column. I can't figure out what is wrong.

    I don't understand what the setTLE function is doing and also where it gets #productcount from. I've tried displaying the #productcount variable, but it only shows as text.

    Please help. It's doing my head in!


    #LOOP(#Products )
    #IF(#productcou nt EQ "0")
    <TR>
    <TD>
    First column here
    </TD>
    <td>
    #BEGIN
    SetTLE("#produc tcount","1");
    #END
    #ELSE
    #IF(#productcou nt EQ "1")
    <TD>
    Second column here
    </TD>
    <td>
    #BEGIN
    SetTLE("#produc tcount","2");
    #END
    #ELSE
    <TD>
    Third column here
    </TD>
    </tr>
    <td>
    #BEGIN
    SetTLE("#produc tcount","0");
    #END
    #ENDIF
    #ENDIF
    #ENDLOOP
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    I don't know what this ePages program is but it needs to be trashed. It's producing awful code.

    Every <td> tag needs a matching/ending </td> tag. Match those up and see if that solves it.

    Comment

    • AricC
      Recognized Expert Top Contributor
      • Oct 2006
      • 1885

      #3
      Originally posted by wallyzebon
      I'm struggling to debug a simple loop in ePages back office. My knowledge of HTML is all self taught, copying and pasting bits of code from here and there, so I'm not too up on the finer points, but I'm not too bad.

      This piece of code should show a list of items in three columns, but it is only showing a single column. I can't figure out what is wrong.

      I don't understand what the setTLE function is doing and also where it gets #productcount from. I've tried displaying the #productcount variable, but it only shows as text.

      Please help. It's doing my head in!


      #LOOP(#Products )
      #IF(#productcou nt EQ "0")
      <TR>
      <TD>
      First column here
      </TD>
      <td>
      #BEGIN
      SetTLE("#produc tcount","1");
      #END
      #ELSE
      #IF(#productcou nt EQ "1")
      <TD>
      Second column here
      </TD>
      <td>
      #BEGIN
      SetTLE("#produc tcount","2");
      #END
      #ELSE
      <TD>
      Third column here
      </TD>
      </tr>
      <td>
      #BEGIN
      SetTLE("#produc tcount","0");
      #END
      #ENDIF
      #ENDIF
      #ENDLOOP
      What is ePages? All of that #... will print as plain text is that what you are aiming for? Here is the proper layout for a table:

      [html]
      <table>
      <tr>
      <td>
      1 column
      </td>
      <td>
      2 column
      </td>
      <td>
      3 column
      </td>
      </tr>
      </table>
      [/html]

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        I think all that extra stuff is code for the ePages program, like PHP, and it gets interpreted.

        Comment

        • wallyzebon
          New Member
          • Jan 2007
          • 4

          #5
          ePages is a modern version of Intershop

          The code is probably my fault as I copied and pasted it from a larger page and I've probably missed part of the table.

          The table layout is not important as I know how that works, it is the #LOOP(#Products ) and #IF(#productcou nt EQ "0") code that is confusing me.

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #6
            Never heard of Intershop either.

            Comment

            • AricC
              Recognized Expert Top Contributor
              • Oct 2006
              • 1885

              #7
              Originally posted by drhowarddrfine
              Never heard of Intershop either.
              Neither have I...

              Comment

              Working...