Thanks for a cool module! It saved me a lot of time.
In my scenario, I still wanted content to display in my blocks even if the node passed in to the view through an argument didn't have any tags associated with it. So I added a config option in the attached patch that made your module support my scenario.
Please feel free to commit it or ask for revisions.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2958902-similarterms-no-tags-bypass-filter-config-6.patch | 2.43 KB | camilo.escobar |
| #2 | no-tags-bypass-filter-config.patch | 2.72 KB | jienckebd |
| no-tags-bypass-filter-config.patch | 2.27 KB | jienckebd |
Comments
Comment #2
jienckebd commentedI messed up the logic in previous patch. This one works better.
Comment #3
luksakShouldn't this be achieved with something described in #1319114: Similar sort without filter? Having a filter in addidion would make your functionality already configurable.
Comment #4
kasey_mk commentedI like this idea too. In the meantime, I guess I'll make a "fallback" view to insert in the "no results behavior" area.
Comment #5
shelaneComment #6
camilo.escobar commentedI rerolled the patch for version 8.x-1.9.
An important correction was also made. The patch in #2 introduced the following code:
However, the condition should check for
!empty($this->tids)instead.With the previous patch, the taxonomy join and filter are applied only when no term IDs are available, which is the opposite of the intended behavior. The filter should only be added when the view has term IDs to match against.
Comment #7
shelane