Hi @all,
I was just wondering if it is possible to define a display plugin that is only available if a specific base table or view type (e.g. the 'File' view type) is used.
I already searched the code base but did not find anything that "explains" this behavior.
I'd appreciate your help & thanx in advance
cheers
hctom
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1062074-display-base.patch | 664 bytes | dawehner |
Comments
Comment #1
dawehnerOnce you have applied this patch it works :)
Therefore specify 'base' => array('node') for example in your hook_views_plugins.
Comment #2
hctomHey thanx for the fast reply :)
That's a nice approach... hope this will make it into the official release... and so this is more a feature request than a support request :)
Comment #3
dawehnerAs long someone reviews/tests the patch this will probably be in the official release.
In general this issues feels a bit, but just a tiny little bit, like a bug.
Comment #4
dawehnerAssign to earl. Perhaps it was intended that displays aren't per base table.
Comment #5
merlinofchaos commentedDisplays do not have their own base tables because it makes field/filter/etc inheritance impossible, since fields for a different base table are going to be different.
That's actually the only reason; so all you really have to do is to make it so that if the display has a different base table than the default display, automatically set anything that relies on the base table to not be defaultable, it's probably okay.
That means we need a little more than this patch will allow.
Comment #6
merlinofchaos commentedOh wait, I misunderstood the purpose of this patch.
I guess having a display specific to one or more base tables is more reasonable.
Comment #7
hctom@merlinofchaos:
Just to make things more clear: I'm building a module that allows views with a certain display plugin to be embedded on a page provided by the module. As the module only deals with files, it would be needless to allow the display on other views than those being a File view.
Cheers
TOM
Comment #8
dawehnerPatch is already in 7.x-3.x, so committed only to 6.x-3.x