0

I have a view with two displays as page. I need the URL of the pages as gallery?display=grid and gallery?display=slideshow and filter the views based on the additional parameter 'grid' or 'slideshow'.

Can anyone help me with this?

1
  • Changing the style plugin (slideshow, map, list, table, etc) based in the display plugin (page, block, etc) is not supported as far as I know. You can always write a new display plugin and make changes to the global $view. I would rather go for views_embed_view call in my own hook_menu page callback.
    – AKS
    Commented Dec 17, 2014 at 23:51

1 Answer 1

0

You can load different displays by using the views_get_view_result() function.

$grid_view = views_get_view_result('YOURVIEWNAME', 'grid');
$grid = $grid_view[0];

More documentation is found here and here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.