Community & Support

Help in understanding event module url syntax

In the admin help for the event module, one finds the following:

For links to a taxonomy filtered calendar the format is:

?q=event/term/$taxonomy_terms

$taxonomy_terms: list of term ids, seperated by '+'. For example to view entries assigned to the taxonomy terms with ids 4 and 9 you would use '4+9'

Can someone clarify if the 'term' in the url means the parent term of a vocab? I am trying to get url's such as www.domain.com/event/orgn-event/day/month/year/node-title.

Comments

To get url's with your

To get url's with your specific needs, you'll need to considerably modify the event module. This is not an easy task to say the least.

The current event module format is the following:

For calendar view

http://www.domain.com/?q=event/year/month/day/ + additional variables such as $taxonomy_term or $type

In fact, typing ?q=event/term/$taxonomy_term (e.g. ?q=event/term/4) will rewrite the url to the example show above.

First of all, "term" in the url does not refer to a vocab. It simply refers to the fact that the the numberical number (e.g. ?q=event/term/4) is the term id 4. Think of it as an associate array where module => event and term => 4. The module is smart enough to know that 4+9 refers to more than one term id and it will return and display the events in the term id 4 and term id 9.

Secondly, you can not access events by node-title. As far as I know, the event module doesn't search for events by node-title. You only search by the event node's type or by the taxonomy_term the node is associated with. Instead of node-title, think of the types or terms. Beginning with drupal 4.6, the event module uses flexinode. If you defined a flexinode as an event type, you should be passing the flexinode-# as the last parameter to view all events of flexinode-# type.

To summerize, you have the following options (just 4 out of many more):

1) Directly access the event by accessing the node

e.g. http://domain.com/?q=node/#

2) Retrieve events by date by appending the respective dates after the event url

e.g. http://domain.com/?q=event/"year"/"month"/"day"

3) Retrieve events by the event type by appending the event type.

e.g. http://domain.com/?q=event/flexinode-1

or by limiting the search even further by date

e.g. http://domain.com/?q=event/"year'/"month"/day"/flexinode-1

4) Retrieve events by the term the event is associated with

e.g. http://domain.com/?q=event/term/$taxonomy_term

I hope this clears up some of the confusion. Remember, unless you plan on rewriting the event module, you can't arbitrarily select how to pass the parameters to drupal.

Thank you. That was most

Thank you. That was most helpful.

You understand the import of my question pretty well- I am seriously thinking of getting someone to rewrite the module or at least propose changes in the hope they will be accepted.

Some of my gripes:

1.) Everything is hard coded to 'event'. Beats me why it shouldn't be 'events'.

2.) Even if I follow the module's url syntax models, there is no way (even with pathauto) to alias the node paths to something like "./event/day/mon/year/node-title". I can only get "./day/mon/year/node-title" or the default "./node/nid". It is possible to get around this by creating a flexinode type called 'event', but:

- it would be very strange to have an event calendar full of links titled 'event' above the teasers
- this won't work if I need/have more event types
- this still doesn't solve the node path problem

3.) The breadcrumbs are hardcoded to Home>>Events (./event), but if I create a vocab with event taxonomy terms (A, B, C), "./event" will not be the top level of a hierarchical section- that is, it won't give breadcrumbs such as Home>>Events>>A or Home>>Events>>B as one would expect.

4.) If I create a vocab with the parent term 'events' and child terms A, B and C to get around all these limitations, I can get correct breadcrumbs and the urls I want, but I have two different views and urls for events- one defined by './event' and linked to the calendar (although there are other options such as list etc.) and another defined by 'events' and linked to the taxonomy term pages.

However, even on these taxonomy pages, the link to calendar from the node goes to "./event", with the breadcrumbs showing Home>>Events and clicking on 'Events' in the breadcrumb does not return the viewer to the taxonomy term listing page, but the "./event" calendar page. Oh, well:(

For a start, it would be great if the event module followed the example of simplenews and image modules in creating a taxonomy parent term (events?) that would serve as the home page of the events section of a site. One should then have the option of displaying either a listing of event nodes (just like on any taxonomy term page) on that parent term page or a calendar, plus all the million options of the current event module.

Edit:
I forgot one more thing. Even if one accepts "./event" and the node paths being "./node/nid", clicking the node link on the calendar dumps the user on a node page that has no connection whatsoever with the previous calendar. You can try this yourself here

Here's are a few possible solutions

1) Turn on taxonomy term filtering in the event settings and install the taxonomy_menu module.

Please take a look at how I setup my calendar for a local XP user group.

http://www.xpwestmichigan.org/site/event

You will notice that I have "taxonomy filter" turned on in my settings for events. (administer -> settings -> event). It gives me the option filter the events using the taxonomy terms I setup. I hope that help with half your problems... 8^)

I also have a block with the event listings. What I did was I installed the taxonomy_menu module. By creating a menu block using the taxonomy_menu, it automatically created links with the taxonomy term name and linked it to the appropriate taxonomy term id. The trick is to configure the block to be only displayed where it's supposed to be, such as only show in event and event/* and the events taxonomy term (e.g. taxonomy/term/5 and taxonomy/term/5/* assuming 5 is the id for the event listing term)

2) You can hide the (event) by editing the event.theme file right? ;^) http://drupal.org/node/42413 - I updated the comment if you haven't noticed yet.

3) Breadcrumbs... that's to do with the way taxonomy handles breadcrumbs and not much to do with events. There was a website where this guy was posting information on how to "correctly" display breadcrumbs using the taxonomy the way you wanted. You'll need to search the forums for related posts and website.

4) Yeah... not much I can be to extend the event module to include a "event gallery" feature.

NOTE: Well... are you expecting the event module to remember the filters? There is a "calendar" link at the bottom of each "event" node that brings them back to THE calendar... I'm not sure how drupal would remember the filters before you clicked on an event node...

I looked at your XP site.

I looked at your XP site. Nice design. You are right. Enabling taxonomy filter views will be useful on my site.

I also saw your taxonomy_menu generated block. It is a good idea too. It is a great way to generate nav blocks based on taxonomy terms, but I am a bit of a perfectionist, so I dislike urls with taxonomy_menu/1/20 etc in them.

I also saw your updated comment on hiding the event type link above the teaser. I will try your suggestion and let you know if it works.

For the time being, I am going to stick with a listing of events on taxonomy term pages and link to the calendar from the event teaser/node. It is still two different urls ("./event" for calendar views and "./events" for taxonomy term page listings), but even the folks at Bryght.com are living with it, so I guess I can too:-)

Once again, thank you for taking the time to respond and for your suggestions. At least I am not alone in wanting specific things from the event module!

nobody click here