By deplifer on
Is there a way say having a $view's object and using on of the existent hooks to override the
$view's handlers display options from exclude = 1 to exclude = 0.
Have done this in the hook_view_pre_view and hook_view_pre_build, without any success.
For the moment using, php code in the template to hide and show fields parsing the query params from the url.
But would like to know if there is any way to achieve this using the hooks.
Comments
Sorry, I'm don't have an
Sorry, I'm don't have an answer, but I think you might have more success if you post a support request on the Views project page.
Have done this in the
Well, its definitely that my comment would not help the author of this topic, but I hope that it would help to other programmers.
So the point is that you should try to exclude fields in views_pre_execute hook since at this stage the view object already has the 'field' property. All you need to do is write the following piece of code in your hook:
That's all.
Cheers.