By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,723 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,723 IT Pros & Developers. It's quick & easy.

HTML loop using ePages back office

P: 4
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(#productcount EQ "0")
<TR>
<TD>
First column here
</TD>
<td>
#BEGIN
SetTLE("#productcount","1");
#END
#ELSE
#IF(#productcount EQ "1")
<TD>
Second column here
</TD>
<td>
#BEGIN
SetTLE("#productcount","2");
#END
#ELSE
<TD>
Third column here
</TD>
</tr>
<td>
#BEGIN
SetTLE("#productcount","0");
#END
#ENDIF
#ENDIF
#ENDLOOP
Jan 18 '07 #1
Share this Question
Share on Google+
6 Replies


drhowarddrfine
Expert 5K+
P: 7,435
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.
Jan 18 '07 #2

Expert 100+
P: 1,892
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(#productcount EQ "0")
<TR>
<TD>
First column here
</TD>
<td>
#BEGIN
SetTLE("#productcount","1");
#END
#ELSE
#IF(#productcount EQ "1")
<TD>
Second column here
</TD>
<td>
#BEGIN
SetTLE("#productcount","2");
#END
#ELSE
<TD>
Third column here
</TD>
</tr>
<td>
#BEGIN
SetTLE("#productcount","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]
Jan 18 '07 #3

drhowarddrfine
Expert 5K+
P: 7,435
I think all that extra stuff is code for the ePages program, like PHP, and it gets interpreted.
Jan 18 '07 #4

P: 4
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(#productcount EQ "0") code that is confusing me.
Jan 23 '07 #5

drhowarddrfine
Expert 5K+
P: 7,435
Never heard of Intershop either.
Jan 23 '07 #6

Expert 100+
P: 1,892
Never heard of Intershop either.
Neither have I...
Jan 23 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.