41 Posts
RatingAction
4 years ago
2
Topic

Hi, I've got a list view that lists, among other fields, a related article field for a content type (in my case main actors for movies). I've set up column sorting for this list, which works as advertised. However, for the related articles field it doesn't sort by the related article's title, but the article ID. The display in the list is by title. So if you click on the respective heading, it does sort the movies by the main actor, but not alphabetically.

I understand the related article field is designed to store the article id and display the article title, but is it possible to sort by the title, not by the id?

You can see the table here: https://www.ratingaction.com/index.php/filme-und-mehr/filme

Get a Book for SEBLOD
1283 Posts
Bucklash
4 years ago
1
Level 1

Mr Bass!

Not sure (don't use related article field), but I reckon you would have to do a join to the other table, then maybe do ordering that way. starting to get complex ;)

An example of join field for my site:


    1. #__map_invoice_session  - many_id <- new join
    2. #__cck_core - pk <-known column
  1.  
    1. #__map_invoice_student - many_id <- new join
    2. #__map_invoice_session - one_id <-known column

for you maybe:


  1.   
    1. #__related_table - id <- or whatever it might be called
    2. #__cck_core - pk <-known column
    1. #__cck_store_form_actor - id <- new join
    2. #__related_table - other_id <-known column

just guessing


41 Posts
RatingAction
4 years ago
0
Level 2

Hello, sir! Phew, that does look complicated indeed! I will probably have to research search joins a bit before I am able to do something here.

Get a Book for SEBLOD