Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I would like to reopen this issue up since Flippy will work with ordering the page by fields, but as far as I can see doesn't work with the weight module value.
Yep, didn't realized that weight module is not using field.
Would it be helpful if I add '->addTag' to the SelectQuery so that anyone wanted to alter the query can use hook_query_TAG_alter to alter the query. This will allow any other modules to customize the result.
I am trying to archive sorting "by weight", and I have upgraded to the dev version.
Could you please help and explain how to make code changes to sort by weight?
Since the module now has ->addTag('alter_flippy_query'); in the query, any modules can implement hook_query_TAG_alter() to be able to alter the flippy SelectQuery. In your case, you will need something like below:
/**
* Implements hook_query_TAG_alter()
*/
function yourmodulename_query_alter_flippy_query_alter(QueryAlterableInterface $query) {
// join the weight table with node table: $query->join(...)
// add orderby weight: $query->orderBy('weight', 'ASC')
}
Comments
Comment #1
rliFlippy is now can sort by node elements, which I believe can provide this feature.
Comment #3
brentrobbins commentedI would like to reopen this issue up since Flippy will work with ordering the page by fields, but as far as I can see doesn't work with the weight module value.
Comment #4
rliYep, didn't realized that weight module is not using field.
Would it be helpful if I add '->addTag' to the SelectQuery so that anyone wanted to alter the query can use hook_query_TAG_alter to alter the query. This will allow any other modules to customize the result.
Comment #5
rliHave added '->addTag' to the SelectQuery in dev. Other module should be able to alter the query now.
Comment #6
marameodesignHi,
I am trying to archive sorting "by weight", and I have upgraded to the dev version.
Could you please help and explain how to make code changes to sort by weight?
Thanks
Comment #7
rliHi marameodesign,
Since the module now has
->addTag('alter_flippy_query');in the query, any modules can implement hook_query_TAG_alter() to be able to alter the flippy SelectQuery. In your case, you will need something like below: