I'm trying to configure the event_calendar view exposed by event_views. Until I can figure out how this *should* be done, it's very difficult to tell if this is a documentation problem or a code problem, so I will initially report it as a code problem.
By default, the view is exposed at event/calendar. The args defined are:
arg[0]: year, as YYYY.
arg[1]: month, as integer??
Currently, in absense of the args, you get a list view with either the years, or the month of the specified year. This is really not the default behavior I want; I'd prefer to get the current month.
There does not appear to be any way to set this in the UI I've been able to figure out.
I've also tried to specify this as PHP code. The following executes without error, and the watchdog call is definitely called:
watchdog('VIEWS', implode(',', $args));
if (!$args[0]) {
$args[0] = date('Y');
}
if (!$args[1]) {
$arg[1] = date('n');
}
return $args;
Is there another way to do this, or is this flat out not working right now?
Comments
Comment #1
Torenware commentedI'm currently working around this by writing a simple module to do a redirect. But there's gotta be a better way than that.
Comment #2
killes@www.drop.org commentedmoving
Comment #3
pieterdcTorenware, there's a little mistake in your piece of code.
You should replace "arg[1]" with "arg[1]".
I placed the code below in the "Argument Handling Code" textarea and it works.
Comment #4
pieterdcCorrection: "arg[1]" should be "args[1]"
My mistake in the previous post.
It was my first post on drupal.org ...