[drupal-support] use of db_rewrite_sql to change the "order by"
Gerhard Killesreiter
killesreiter at physik.uni-freiburg.de
Fri Jun 24 16:59:56 UTC 2005
On Fri, 24 Jun 2005, Dan Robinson wrote:
> well what we are trying to do is introduce a weighted sort for taxonomy
> pages - this is useful for websites with a relatively small number of
> nodes where they want an explicitly ordered display.
Sounds wuite specialized to me.
> The weighting part
> is easy. It would be nice to intercept the sql and rewrite it.
> Otherwise it seems like the only way to do this is to duplicate the
> taxonomy display code yada yada.
I think the only thing you'd need to duplicate is the taxonomy_term_page
function.
> Is this a reasonable approach? Could db_rewrite_sql be jiggered
> relatively easily?
I think it should be possible to introduce an "order by" element.
Needs some refactoring of db_rewrite_sql and _db_rewrite_sql.
Cheers,
Gerhard
More information about the drupal-support
mailing list