I have a flexinode type devoted to listing research publications. I have a text field that is used for the full citation reference (using American Psychological Association style) and a file field that is used for uploading electronic versions of manuscripts. I would like user to be able to sort the resulting table by the citation reference, but currently they can only sort by the title or file columns. How can I make it so that the table is sortable by the text field, as well?

I considered just placing the citation information in the title field, but the citations can be quite lengthy and often exceed the 255 character limit of the title field.

Any suggestions would be welcome. It seems it would be useful to be able to sort flexinode tables by *any* column or field, incidentally -- why is this restriction in place?

Comments

spazfox’s picture

I figured out a hack for what I was looking to do. I just added this bit of code to the field_textarea.inc file:

//BEGIN add sort textarea field
function flexinode_field_textarea_db_sort_column($field) {
return 'flexinode_'. $field->field_id .'.textual_data';
}
//END

Now I can sort by the textarea field in the table listing.