each loop list is sorted by document id not alphabetically
-
Hello,
I have two pods, one is “actors” the other one is “films.
I established a bi-directional relatiobship between them and it works fine.
The problem I have is when I try to list the films of the actor in the actor page. I use the code below:[if actor_films] <h2> <span class="films_of_title">Below is the list of {@actor_films,count} {@actor_name} films in the database:</span></h2> <ul class="filmlist"> [each actor_films] <li><a href="{@permalink,esc_url}">{@name}</a> <br>Film Genre: <span style="font-size:90%;font-weight:400;">{@film_genre}</span></li> [/each] </ul> [else] <p>This actor has no films in our database.</p> [/if]
[each] loop returns the list of films fine but they are sorted by ID not alphabetically. How can I fix this?
Thanks
Mehmet
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘each loop list is sorted by document id not alphabetically’ is closed to new replies.