Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Alternate Colors for listing on category.html page

Quote Reply
Alternate Colors for listing on category.html page
I was wondering if it was possible to have alternate colors for listings display on category.html or any other page. For example

[Bg color FFFFFF]
Listing Title 1
Description for Listing Title 1

[Bg Color F2F2F2]
Listing Title 2
Description for Listing Title 2

[Bg color FFFFFF]
Listing Title 3
Description for Listing Title 3

I understand that the layout information is displayed using link.html. So it above feature possible?

Thank you again.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Alternate Colors for listing on category.html page In reply to
In link.html you have <%row_num%> available, which counts up by one for each link.

You also have <%even%> available, so if you put that inside an if statement that is probably all you need e.g.:

Code:
<%if even%>
formatting here
<%endif%>
Doesn't get much easier than that!
Quote Reply
Re: [aus_dave] Alternate Colors for listing on category.html page In reply to
Wow.. this seems sooooo easy, thank you for the input, I will test it and also let you know how it worked.

Thank you again.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [aus_dave] Alternate Colors for listing on category.html page In reply to
Hi Aus Dave,

Thank you for the tip, I just tested and it worked great.

<%row_num%>
In addition I notice that each listing is having an number from 1 to 10 (when there is limit of 10 links per page). However the number resets on next page and instead of starting from 11, it starts with 1. Is there any way to make it continue with the numbering, so template layout can also include link number too?

P.S. Thank you again for the <%even%> tip, it will help a lot in designing the layout.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Alternate Colors for listing on category.html page In reply to
If using dynamic pages, you could use;

<%set start_num = $nh * 10 + $row_num%>

..in link.html

So, in theory.. that would do stuff like;

record 5 on page 3;

3 * 10 + 5 (35)

..or;

record 9 on page 2;

2 * 10 + 9 (29)

So the query would be as simple as this;

<%set start_num = $nh * 10 + $row_num%>
Link #: <%start_num%>

You may even be able to do it with;

Link #: <%$nh * 10 + $row_num%>

(I'm not so sure on that one though =)).

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Alternate Colors for listing on category.html page In reply to
Hi Andy,

Thank you for the reply. Your idea did seem to work and produced desired output.

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Alternate Colors for listing on category.html page In reply to
Cool, glad it worked :) Been a little rusty on LSQL since being inactive on the forum for a while. Glad the nack of it all hasn't gone though <G>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Alternate Colors for listing on category.html page In reply to
Hey Andy,

Did you checked out the Web Hosting Kit site? it was lots of your effort and help too that made it possible, & I can hardly wait for the launch of Software Devil. Cuz of the combination of the globals by you & Laura and help from this board, I have been able to add some of the most interesting features within one directory (now the hard part is to set them up all together).. If I live past the surgery that I got in 4th week of June, then I am hoping to launch the site by or before Aug 1st. Smile

Thanks again for the support.

Vishal

Vishal
-------------------------------------------------------