March 2019
Intermediate to advanced
580 pages
15h 3m
English
Let's go ahead and enrich the responsibilities of the team name field by making our list of players filterable and sortable by it; for example, to only show the players of a given team or sort the players alphabetically by the team name. It could not be easier. We just have to add these to the team name field definition (like we added the relationship to the players' team_id field):
'sort' => array( 'id' => 'standard', ), 'filter' => array( 'id' => 'string', ),
So basically, we are using the Standard sort plugin for sorting (which basically defaults to whatever MySQL can do). As for the filter, we are using the StringFilter plugin, which is quite configurable from the Views UI. It even allows us various filtering ...
Read now
Unlock full access