Forums
This topic is locked
how to create a news list
Posted 24 May 2004 19:17:47
1
has voted
24 May 2004 19:17:47 Wayne Hultum posted:
Hi,I'm creating a site with a news section, and I want to display the results like this (click here). Where the top 3 stories have a picture and the rest just have the title.
I can get it to display either all with the picture or all the titles, I just don't know how to split them up.
Any help appreciated.
Thanks
Wayne
Edited by - wayne1000 on 25 May 2004 12:06:54
Replies
Replied 24 May 2004 20:10:44
24 May 2004 20:10:44 Dave Thomas replied:
do 2 repeat regions, top region with 3 records and the image field
2nd repeat region, showing just the titles.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
2nd repeat region, showing just the titles.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 25 May 2004 10:57:49
25 May 2004 10:57:49 Wayne Hultum replied:
Thanks Dave,
Would the second repeat region show all the titles including the top 3? If so is there a way I can have all the stories except the top 3 in the title list.
When I add another story would the bottom story of the top 3 be moved down to the title list.
Regards
Wayne
Would the second repeat region show all the titles including the top 3? If so is there a way I can have all the stories except the top 3 in the title list.
When I add another story would the bottom story of the top 3 be moved down to the title list.
Regards
Wayne
Replied 25 May 2004 17:39:27
25 May 2004 17:39:27 Dave Thomas replied:
set your first repeat up to use the first 3 records using, ID's in a DESC sort, so it will always be the last 3 id's.
so your repaet regions will look like:
<pre id=code><font face=courier size=2 id=code><font color=red>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 3
Repeat1__index = 0
rsNews_numRows = rsNews_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index
Repeat2__numRows = 20
Repeat2__index = 3
rsJobs_numRows = rsJobs_numRows + Repeat2__numRows
%>
</font id=red></font id=code></pre id=code>
look for :: > Repeat2__index = 3
the '3' means the second repeat will start showing records after the 3rd ID.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
so your repaet regions will look like:
<pre id=code><font face=courier size=2 id=code><font color=red>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 3
Repeat1__index = 0
rsNews_numRows = rsNews_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index
Repeat2__numRows = 20
Repeat2__index = 3
rsJobs_numRows = rsJobs_numRows + Repeat2__numRows
%>
</font id=red></font id=code></pre id=code>
look for :: > Repeat2__index = 3
the '3' means the second repeat will start showing records after the 3rd ID.
Regards,
Dave
[DWMX 2004]|[FlashMX 2004 Pro]|[Studio MX 2004]|[SQL]|[Access2000/2002]|[ASP/VBScript]|[XP-Pro]
If you like online gaming, please register @ www.nova-multigaming.com
Replied 25 May 2004 17:42:03
25 May 2004 17:42:03 Wayne Hultum replied:
Thanks a lot Dave.