www.mysite.com/event displays calendar view of this month but is there a way to have a table, list view? The links on the calendar page are www.mysite.com/event/2008/02/08/week/all/all, so the date has been coded in. If you leave out the date it defaults to 1970, i.e. www.mysite.com/event////week/all/all as does www.mysite.com/event/week/all/all. There doesn't seem any link that does generate a different view unless I have mised something. It would be useful if today was the default rather than 0 which would seem a quick fix.

Comments

DGvNp0niToyRspXaaqx3PiQBMn66QXyAq5yrNHpz’s picture

This might be completely wrong for your situation but in the past I have placed the date into the link dynamically:

  $current_year = date('Y');
  $current_month = date('m');
  $current_day = date('d');

  print '<a href="' . check_plain($base_url) . '/event/' . check_plain($current_year) . '/' . check_plain($current_month) . '/' . check_plain($current_day) . '/list/'">Events</a>';

This would work in the case of the link being in a Node or a Block. Primary Links however, would need to be rewritten in the template.php file

malc_b’s picture

Thanks for the suggestion. It is for the primary links that I wanted this. However, it has made me think about views, cck, contemplate. One of those can generate today's date. But can one of those display event/yr/mth/day ? I'll have to look into it.

Leiph’s picture

Have you tried the three event views (reqs Views module) event_date, event_js and event_select? It seems as they might bring you a bit on the way.

malc_b’s picture

Thanks for the suggestion. I hadn't noticed them. Certainly a good place to start.

japerry’s picture

Status: Active » Closed (outdated)

Event for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.