Reputation: 4695
I want to alter some arguments from texonomy_term view.
function MYMODULE_views_pre_execute(&$view){
if ($view->name == 'taxonomy_term') {
$view->set_arguments(array(1)); // I want to change first arg to '1'
}
}
But nothing works. On term page the result remains the same (default).
Upvotes: 1
Views: 3947
Reputation: 803
You can also set the default argument to '1' on the views argument section .
Upvotes: 0
Reputation: 5642
You don't need module code for that; you can specify in the Views UI that the first argument should default to 1 (or any other value).
Upvotes: 0