Widget per node type
gausarts - September 9, 2008 - 04:39
| Project: | Plus 1 |
| Version: | 6.x-1.3 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
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

#1
Working on that.
#2
I 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.
#3
Hi 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.