Skip to main content
deleted 31 characters in body
Source Link
Suresh R
  • 1.7k
  • 2
  • 16
  • 27

I want to pass contextual filter arguments programmatically to a view. I know it can be done through views_get_view and views_embed_view, but I want to pass it to a view's page display. Also I want to pass multiple arguments to the view, so it won't be good to pass all the arguments in the url. I tried to pass the arguments using $view->args = implode('+', $args); in hook_views_pre_render, but it didn't work. Does anyone know how to pass contextual filter arguments using any of view hooks like hook_views_pre_render()?

I want to pass contextual filter arguments programmatically to a view. I know it can be done through views_get_view and views_embed_view, but I want to pass it to a view's page display. Also I want to pass multiple arguments to the view, so it won't be good to pass all the arguments in the url. I tried to pass the arguments using $view->args = implode('+', $args); in hook_views_pre_render, but it didn't work. Does anyone know how to pass contextual filter arguments using any of view hooks like hook_views_pre_render()?

I want to pass contextual filter arguments programmatically to a view. I know it can be done through views_get_view and views_embed_view, but I want to pass it to a view's page display. Also I want to pass multiple arguments to the view, so it won't be good to pass all the arguments in the url. I tried to pass the arguments using $view->args = implode('+', $args); in hook_views_pre_render, but it didn't work. Does anyone know how to pass contextual filter arguments using any of view hooks?

Source Link
Suresh R
  • 1.7k
  • 2
  • 16
  • 27

Pass view contextual filter arguments programmatically

I want to pass contextual filter arguments programmatically to a view. I know it can be done through views_get_view and views_embed_view, but I want to pass it to a view's page display. Also I want to pass multiple arguments to the view, so it won't be good to pass all the arguments in the url. I tried to pass the arguments using $view->args = implode('+', $args); in hook_views_pre_render, but it didn't work. Does anyone know how to pass contextual filter arguments using any of view hooks like hook_views_pre_render()?