Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Pass sort order to record display?

Quote Reply
Pass sort order to record display?
Hi,

I've set up a database with a frontpage master list that contains all records with several data columns.

Link: http://www.wcsauto.com/...p;so=DESC&mh=500

Each column has a link so visitors can reorder the master display how they want, but when they click to view an individual record I would like the 'back' link to contain their preferred sort order.

How would I pass the value of 'sb' into the record view template so that I can retain the sort order for the return link?

I've done a <GT:TMP:DMP> and there's no listing for 'sb'.

All the best
Shaun
Quote Reply
Re: [qango] Pass sort order to record display? In reply to
Hi,

You should change the URL which goes to the detail page like:

db.cgi?.....&<%if sb%>sb=<%sb%><%endif%><%if so%>&so=<%so%><%endif%>

and change the "back" link as well.

Hope that helps.

TheStone.

B.
Quote Reply
Re: [TheStone] Pass sort order to record display? In reply to
Stone,

Excellent, thanks - that's exactly what was needed - I wasn't passing sb or so to the detailed view page.

Once I updated the URL linking to the detailed page and included them it worked like a charm Smile

All the best
Shaun
Quote Reply
Re: [qango] Pass sort order to record display? In reply to
Hello

It worked to show all the records, but how can I do if I want to keep the query that was made?

and how to order by a related table?

Thank you

Fábio
Quote Reply
Re: [assombracao] Pass sort order to record display? In reply to
You should pass in sb=table.fieldname instead of sb=fieldname.

TheStone.

B.