Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
Will this be possible to have a per node type basis for teaser and full view optios on Display settings? This will allow finer control over which node type shall have a widget-enabled teaser, etc. Thanks
Comments
Comment #1
Chill35 CreditAttribution: Chill35 commentedWorking on that.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedI think you can get this quickly by changing
theme('plus1_widget'
to
theme(array($content_type. "_'plus1_widget'", 'plus1_widget')
In other words, pass an array to theme() and the functions will be searched in order. You will have to actually put in the right variable instead of $content_type.
Comment #3
Chill35 CreditAttribution: Chill35 commentedHi guys!
Also, I pass the node object to the theming function, so reading $node->type will get you the machine-readable name of the content type within the theming function.
Comment #4
NancyDruWhenever I can commit, Moshe's suggestion will be put into the module (6.x-2.x only). Moving the teaser/full settings to the content type has been in the back of my mind, so this moves it up in priority.
Comment #5
NancyDruComment #6
NancyDruThe theme change is now in the -dev version, therefore you may do your own theme function by content type (theme_type_plus1_widget).
See #1025794: Make settings per-content-type. for the per-type request.