RC6: HTML Template: Loop command

Bugs found in XnView Classic. Please report only one bug per topic!

Moderators: helmut, XnTriq, xnview

Post Reply
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

RC6: HTML Template: Loop command

Post 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>
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post 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...
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post 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>??
Pierre.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post 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.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post 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.
Post Reply