Lasso Soft Inc. > Home

  • Articles

Displaying records - sideways

Displaying a number of records / images in horizontal direction.

Using loop_count and the mod operator

<table>
	<tr>
		<td>
			<table>
				<tr>[records]
					<td>
<a href="[Field: 'Link_URL']">

<img src="[Field:'Image_URL']" alt="" height="143" width="210" border="0" /></a><a href="[Field: 'Link_URL]">[Field: 'Image_Caption']</a></td>
					[If: (Loop_Count % 4) == 0]</tr>
				<tr>[/If][/Records]</tr>
			</table>
			</td>
	</tr>
</table>

 

Note: The number of columns listed is determined by the 'Loop_Count', in the above sample it is the number '4'.


Using lp_array_columns

The custom tag lp_array_columns provides an easy way to quickly format an array, or in the case of records, records_array. Below shows the various display scenarios; follow this link to see actual coding examples for the below:

Raw: 
 
a    b    c    d    e    f    g    h    i     
 
 
Horizontal: 
 
a    b    c     
d    e    f     
g    h    i     
 
 
Vertical: 
 
a    d    g     
b    e    h     
c    f    i     
 
 
Horizontal -maxcols=2: 
 
a    b     
c    d     
e    f     
g    h     
i         
 
 
Horizontal -maxrows=2: 
 
a    b    c    d    e     
f    g    h    i         
 
 
Horizontal -maxcols=2, -maxrows=2: 
 
a    b     
c    d     
 
 
Vertical -maxcols=2: 
 
a    f     
b    g     
c    h     
d    i     
e         
 
 
Vertical -maxrows=2: 
 
a    c    e    g    i     
b    d    f    h         
 
 
Vertical -maxcols=2, -maxrows=2: 
 
a    c     
b    d 

 

Visit http://tagswap.net/lp_array_columns for more information and download links

Author: Detlef Hebbel
Created: 19 Feb 2008
Last Modified: 3 Mar 2011

Comments

No comments found
You must be logged in to comment.

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft