I need to set a contextual filter programmatically and almost every view I have will have this filter. However, some wont and will have other contextual filters instead.
I have tried following the examples in here but this will just set the first argument to be my filter value regardless of what field is it for.
views_pre_build I get the keyed arguments list under
$view->argument and can do
->setArgument() but this doesn't change the set of results.
Is there an easier way of setting a specific contextual filter?