Hello,
here's the patch that extends functionality of this module, I've noticed similar requests here and personally needed some options.
This patch adds following:
- Filtering display of terms per role basis, which is different of existing Display style: none (hidden) which if chosen hides terms for everyone, including admin.
- Limit display of terms for chosen content types, handy if one needs some content type to be tagged with certain terms but still not want to display those on node pages but for instance on views or similar. This depends of Vocabulary settings for content types - only those can be affected.
- Three more display styles:
parents which displays terms in parent->child order no matter of vocabulary or terms weight, might be useful for huge number of terms to avoid batch changing of weights etc.
nodelinks displays links to other nodes which are related with actual one by same term(s), logically doesn't show link to actual one though.
plain displays only terms' names, not links
Note that there is term_display.install patch too as I made it with two more table fields.
I am not sure if this is proper approach and also if field type 'text' is ok for types and roles.
Issues or TODOs ?
-- content type options (select list ) - would be better to holds only ones that are checked for vocabulary itself didn't figure how to make it ...
-- maybe to make option for term synonyms instead of terms' names?
Thanks in advance for testing or any suggestions, response.
Nenad
Comment | File | Size | Author |
---|---|---|---|
#5 | term_display.patch | 9.16 KB | nk_ |
term_display_install.patch | 865 bytes | nk_ | |
term_display.patch | 12.59 KB | nk_ |
Comments
Comment #1
joachim CreditAttribution: joachim commentedRegarding filtering term by role, http://drupal.org/project/taxonomy_role does this already. It's best not to duplicate functionality of another module.
Comment #2
nedjoThanks for the patch! The new display options look good.
If you could post a patch just for the three additional display styles, that would be great. I don't want to add filtering to this module--I agree with joachim, that's best handled elsewhere.
Please use double spaces instead of tabs for indenting.
Comment #3
nk_ CreditAttribution: nk_ commentedthanks for feedback!
@joachim:
I don't think it is the same functionality. Taxonomy role module filters terms on node (editing) forms, so certain roles who have permission to edit particular content still can't edit it's taxonomy. Here is the visibility matter on node displays, for instance if you have certain vocabulary that you want displayed only for admin (and/or some other roles) but not for all. On the other hand I agree not to duplicate functionality and I also use taxonomy role for its purpose and I don't feel comfortable having too many modules on.
Am I right on this? and if so is there other solution for this case. Or I didn't figure Taxonomy role's in complete:(
For the filtering by content type, it's really rare case and not quite functional (for real would need too many relations) so I also think not needed for this module. This was rather like a possibility suggestion ...
@nedjo: I will gladly post patch with only styles later today, but please also consider roles filtering once again (if I am right that taxonomy role doesn't do that).
Thanks again, Nenad
Comment #4
nedjo@nk_: I'm looking forward to the new patch, thanks.
Re roles, this is probably covered by http://drupal.org/project/vocabperms and/or http://drupal.org/project/taxonomy_hide. If not, it could go in one of those modules.
Comment #5
nk_ CreditAttribution: nk_ commentedOk, here is the new patch, styles only. Hopefully no tabs ...
Note I added variable $limit in helper function for nodelinks style. This gives possibility to customize number of results from database on theme level. Initially it was set to 10 but maybe someone wants more or limit to less ... let me know what do you think about this.
And as additional instruction here is the one theme override example for it, I use it to display first 'nodelink' different than the rest ones and to limit number of links.
TODOs (maybe?)
- Views support
-- how's that possible anyway? with hook_views_data?
- Synonyms
-- do you think it is worth to try? This can be done in theme too using taxonomy_get_synonyms but not so precise in terms which synonym to use or so...
Ok for roles filtering, thanks for suggestions Nedjo I'll look in those modules but I hope I won't need 3-4 modules in total for managing terms. I also use Taxonomy role for its purpose maybe to try with patch there (seems like logical) and than have only 2 modules :)
Cheers, Nenad
Comment #6
nedjoApologies, I haven't found time to review this.
If someone could review and test I'd appreciate it.
Comment #7
big67 CreditAttribution: big67 commentedHello
I tested the patch: it seems to work, at least using the "plain" mode.
(I use 7 different vocabolaries on my site)
The vocabs are printed also on the truncated - teaser version of the nodes: is this by design?
To be honest, I applied the patch manually, but think to have done everything correctly.
regards
Big
Comment #8
rstamm CreditAttribution: rstamm commentedPlease split into separate patches. It's easier then to review.