Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Links Per Row

Quote Reply
Links Per Row
Hi,

what file do I need to change so I can have more than 1 link per row

Thanks!
Quote Reply
Re: [shimmy1] Links Per Row In reply to
Hi,

This should work - it will put them into 3 columns:

Code:
<%loop links_loop%>

<%if first%> <%-- set up the opening table --%>
<table class="pctable">
<tr>
<%endif%>
<td valign="bottom">
<%include link.html%>
</td>
<%ifnot row_num % 3%> <%-- close the row --%>
</tr>
<tr>
<%endif%>


<%if last%> <%-- close the table --%>
<%if row_num % 5 eq 2%> <%-- balance the trailing rows --%>
<td></td>
<%elsif row_num % 5 eq 1%> <%-- balance the trailing rows --%>
<td></td><td></td>
<%endif%>
</tr>
</table>
<%endif%>

<%endloop%>

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Links Per Row In reply to
You know what Andy, I think it would be really interesting to see how many of the Ginks users would deal if your internet were to go offline for a week.

I think GLinks is a great product, however if it was not because of the support and help from you, Laura, Adrian and few others, I don't think it would be equally fun to work on GLinks.

Thanks again for this nifty code and tons of help.

Vishal

-------------------------------------------------------
Web Hosting Kit: A to Z of Web Hosting! http://www.webhostingkit.com/
Software Devil: Software Search Made Easy! http://www.softwaredevil.com/
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Links Per Row In reply to
haha maybe we will see - as I'm off for next week anyway =)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Links Per Row In reply to
works great thanks! now just gotta figure out how to change it to 2 per row
Quote Reply
Re: [Andy] Links Per Row In reply to
I am only days away from the launch of Software Devil and you have to go on vacation - u r terrible man... well atleast one of us is gonna be relaxing in that case.. have fun.

Vishal

-------------------------------------------------------
Web Hosting Kit: A to Z of Web Hosting! http://www.webhostingkit.com/
Software Devil: Software Search Made Easy! http://www.softwaredevil.com/
-------------------------------------------------------
Quote Reply
Re: [shimmy1] Links Per Row In reply to
Hi,

I thought I would convert that code to work with CSS, instead of loads of table cells etc.

Thsi should work fine for 2 columns:

Code:
<style>
.city_left_col {
float: left;
width: 275px;
}
.city_right_col {
float: left;
width: 275px;
}
</style>



<%set split = Links::Utils::column_split($links_loop.length, '2')~%>
<%loop links_loop%>

<%if row_num == 1%>
<div class="city_left_col">
<%endif%>

<%include link.html%>

<%if row_num == $split%>
</div>
<div class="city_right_col">
<%endif%>


<%if last%>
</div>
<div style="clear: both;"></div>
<%endif%>


<%endloop%>

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates