Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Linking to "/calendar
" displays the current month. I'd like to create a link from another page (or from the menus) to:
- The current year
- The current month (URL: /calendar )
- The current week
- Today
I could create such a link with PHP (not sure how to do this in a menu), but is there a shortcut whereby /calendar/thisweek
would show a page with the current week, in the same way that /calendar
shows the current month?
Comments
Comment #1
iantresman CreditAttribution: iantresman commentedI solved this by (a) using CSS to hide the default calendar links (using CSS Injector) (b) In my View, adding to the Header setting, PGP code that dynamically generated the appropriate links:
Where @ represents a backslash \, but the code box wouldn't show it.
Comment #2
iantresman CreditAttribution: iantresman commentedComment #3
apadernoI am closing this issue, since it's for a Drupal version no longer supported.