Page 1 of 1

RC6: HTML Template: Loop command

Posted: Fri Jun 10, 2005 7:11 pm
by helmut
<Moderator's note: This topic was split from topic "Create Webpage: Possible improvements">

- Loop Directions without HTML
Currently, #THUMB_START# and #THUMB_END# are used for looping over the thumbnails, which is good and clear. But these directions also generate a <tr> and a </tr>, I think this shouldn't be done since this limits down the usage.
For example, you cannot have a table one column of thumbnails using:

Code: Select all

<table>
#THUMB_START#
<tr>
<td>
<a href="#FRAME_PAGE#" target="frame2"><img src="#THUMB_LINK#" border="0" alt="#FILENAME#"></a>
<div>#FILENAME#</div>
</td>
</tr>
#THUMB_END#
</table>

This should be implemented in 1.80, since a later change would affect all existing WebTemplates and users' WebTemplates.

The problem can be seen here:

Currently, the template is:

Code: Select all

<br><br><center><table border="0">

#THUMB_START#
<td align="center" valign="bottom">
<a href="#FRAME_PAGE#" target="frame2"><img src="#THUMB_LINK#" border="0" alt="#FILENAME#" width="#THUMB_WIDTH#" height="#THUMB_HEIGHT#"></a>
<div>#FILENAME#</div>
</td>
#THUMB_END#

</table></center><br>

The result is:

Code: Select all

<br><br><center><table border="0">

<tr><td align="center" valign="bottom">
<a href="original/collage.html" target="frame2"><img src="thumb/t_collage.gif" border="0" alt="collage.jpg" width="96" height="100"></a>
<div>collage.jpg</div>
</td>
<td align="center" valign="bottom">
<a href="original/collage1.html" target="frame2"><img 
...
As you can see, a <tr> and </tr> is inserted, which shouldn't be there.

XnView 1.80 <x>

Posted: Fri Jun 10, 2005 9:21 pm
by helmut
Looking at the Webpage create for a second time I've found that there's a setting 'Columns', which controls how '<tr>' are set.

I wonder whether the page template should control the <tr>, only, and no control "Columns" would be needed. At the moment, a webtemplate with all thumbnails aligned in one row is not possible.
Have to think about this...

Posted: Tue Jun 14, 2005 9:34 am
by xnview
helmut wrote:Looking at the Webpage create for a second time I've found that there's a setting 'Columns', which controls how '<tr>' are set.

I wonder whether the page template should control the <tr>, only, and no control "Columns" would be needed. At the moment, a webtemplate with all thumbnails aligned in one row is not possible.
Have to think about this...
Perhaps i can add #THUMB2_START#, #THUMB2_END# which not create <tr></tr>??

Posted: Fri Jun 17, 2005 11:17 pm
by helmut
xnview wrote:
helmut wrote:Looking at the Webpage create for a second time I've found that there's a setting 'Columns', which controls how '<tr>' are set.

I wonder whether the page template should control the <tr>, only, and no control "Columns" would be needed. At the moment, a webtemplate with all thumbnails aligned in one row is not possible.
Have to think about this...
Perhaps i can add #THUMB2_START#, #THUMB2_END# which not create <tr></tr>??
Yes, that's a good idea. THUMB2_START sounds a bit strange, though, but I can't think of anything better at the moment.

Posted: Fri Aug 29, 2008 5:46 am
by helmut
Is THUMB2_START available in the current XnView version 1.94?

EDIT:
Just tried and from what I can see THUMB2_START / THUMB2_END do work.

A list of all HTML keywords available can be found in topic Webpage templates: List of keywords.