0

I have enabled the calendar module which generate a new view called calendar.

The calendar view has a page called month with just one contextual filter. It works fine.

The problem is that I to added a second contextual filter.This is what I've done:

  • The content type that this view page shows is: "actividades".

  • This content type has the field "poblacion" of the type (term reference).

Then in the view:

  • I added a Relationship: Content: Taxonomy terms on node

  • I added the Contextual Filter :(term form Poblaciones) Taxonomy term: Name .

But it's not working at all. I think I need to modify the path of this view page which at the moment is: actividades/month. But I don't know how...

If I go to the url: actividades/month/barcelona it doesn't work even though I have a node tagged with this term. I guess this happens because the first argument is for the date, here is where I get lost

enter image description here

1

What are you trying to achieve exactly? You want to restrict the calender to show only nodes tagged with a certain term?

It looks like you're trying to do this by setting up a relationship with the terms and then passing in the term name. Is there a reason why you're not using the Content: Has taxonomy term ID contextual filter? This cuts out the need for the relationship, but requires you to pass a term ID rather than a term name.

If there is a reason why you're not doing this, then ignore me :) Just thought I'd reply in case you didn't know about it.

  • I need exactly what you said: "show only nodes tagged with a certain term". I just tried what you said. But not working. Shouldn't I change the path?? – chefnelone May 3 '12 at 19:06
  • if I go to this path: actividades/month/barcelona it doesn't work even though I have a node tagged with this term. I guess this happens because the first argument is for the date, here is where I get lost. – chefnelone May 3 '12 at 19:14
  • I'm currently unable to try stuff out in views properly due to this issue drupal.org/node/1559512 but I think your path should be actividades/month/[DATE]/[TERM_ID] - I'm not sure what format the date should be in, but the term ID is numeric, not the term name (if you want the URL to contain the name, set up URL aliases). – andykisaragi May 4 '12 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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