Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As per IRC discussion with Earl, it'd be nice to have an option so that when we're constructing a summary view for a taxonomy term argument, if a term has a synonym, to use that for the link in the summary view. Seems to be working on my test site, stay tuned for the patch...
Comment | File | Size | Author |
---|---|---|---|
#5 | views_validate_taxonomy_convert.patch | 807 bytes | jfall |
#2 | 623392-2.term-synonym-summary-links.patch | 2.04 KB | dww |
#1 | 623392-1.term-synonym-summary-links.patch | 2.04 KB | dww |
Comments
Comment #1
dwwApplies cleanly to both DRUPAL-6--2 and DRUPAL-6--3 branches. Applies with offset to DRUPAL-7--3. Only tested on DRUPAL-6--2.
Comment #2
dwwFixed minor typo in previous patch that broke the checkbox which somehow slipped in.
Meanwhile, I'm wondering how summary views ever work if you have a term id argument and use the "convert name to tid" or "convert name or synonym to tid" validation behavior. Seems like the summary view defaults to links like:
http://example.com/view-path/123
and then the arg validator can't find a term name or synonym with the string "123" and you get a 404...
Seems like this new setting needs a few options to really solve this problem, e.g.:
Links for summary view:
( ) Term ID (default)
( ) Term name
(x) Term synonym if defined, default to term name
??
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedIn fact, summary views don't work well at all with validators that do conversion, because validators currently do not have a way to back-convert. That's a known limitation that I just haven't gotten around to working on.
Committed to the 3.x branch. Not sure I want to do this on 2.x since I'm trying to limit new features there, now. Let me know if you have a compelling need for this in 2.x.
Comment #5
jfall CreditAttribution: jfall commentedEarl's already said he's not fixing this in the 2.x branch, but here's a small patch (more of a hack) that I used to make my summary views work.
View has a Term ID argument, with Convert to Term validator so I can use nice URL's, with synonyms on terms containing special characters (as suggested above). Works like a charm.
But the summary view is messed up because it lists term ID's which don't validate.
My hack: allow the 'convert' validator to validate tid arguments in addition to terms and synonyms. Works for me - hope it helps someone else.
Comment #6
vlooivlerke CreditAttribution: vlooivlerke commentedHi
The views 3 patch works great, how can I add:
Replace spaces with dashes
and make link test lower case
someting like: WHERE (replace(ts.name, ' ', '-')
This feature can be done in taxonomy term name summery sort.
Thanks
Comment #7
MustangGB CreditAttribution: MustangGB commented