2 Dec 2004 16:58
Re: Browsing and filtering results in Table
Peter Cruickshank wrote: > OK, I've got the hang of how to use the Table class to present lists of > data with optional sorting. > > My next task is to filter the data that is being presented. By filter > here, I mean restrict items to those which fall within a date range, or > match a certain pattern. I've played around with adding a Form to handle > that side of things and it seems the way forward, but it would be good > to have some hints on ensuring that the filtering constraints are added > to the pagination and sort links. > > I think the approach seems to be the search form sets parameters in the > table node, specifying the restrictions. The table node then uses them > to restrict the search done by the dataprovider, and somehow (through > query_prepend?) tells the smarty paginator to add the extra information > to the links it generates. Why not store the search entry in session, so you keep it without passing it via GET ? I must admitt I didn't have to do such filtering, but I will soon have to. I'll post my solution then. -- -- Jean-Christophe Michel
The more elegant the solution, the less code we have to write imo
(reverse the proposal too).
PS: if you have a smart gallery script, maybe think to commit it in vortex/
RSS Feed