applying views exposed filters

Created on 7 April 2023, almost 2 years ago

Module works beautifully thanks, but it was far from obvious how to apply the views filter to my entity's taxonomy field.
The readme file didn't help.
The comments on the modules page didn't mean anything to me.

add a new filter using the field set-up as "Simple hierarchical select" or
use "Content: Has taxonomy terms (with depth; Simple hierarchical select)"
as a new filter

What I did in the end was in MyModuleViewsData::getViewsData() added the line:
$data['myentity_categories']['categories_target_id']['filter']['id'] = 'taxonomy_index_tid';
or
$data['myentity_categories']['categories_target_id']['filter']['id'] = 'shs_taxonomy_index_tid';
which seemed to have the same effect.
So I guess its time to update the readme to explain why this is necessary and what the difference is between these options.

📌 Task
Status

Active

Version

2.0

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024