Modify

Opened 8 years ago

Last modified 7 years ago

#12605 new enhancement

When used on a wiki page that matches the format string, set current day

Reported by: Patrick Schaaf Owned by:
Priority: normal Component: WikiCalendarMacro
Severity: normal Keywords:
Cc: Trac Release:

Description

Here's a small enhancement patch. It adds one automatic (no configuration needed) feature:

When the macro is used on one of the calendar's by-date subpages, and the page was not reached by navigation (today not yet determined), the patch sets the current day to the subpages date itself.

Attachments (1)

WikiCalendarMacro-strptime.patch (2.8 KB) - added by Patrick Schaaf 8 years ago.
Set today when used on fitting subpage

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by Patrick Schaaf

Set today when used on fitting subpage

comment:1 Changed 8 years ago by Patrick Schaaf

Note: first hunk in patch is unrelated to the change, and was already posted in reopened #9568

comment:2 Changed 8 years ago by Patrick Schaaf

Application note:

I create two wiki pages:

  • MyMeetingMinutes contains
    '''some common heading, optionally'''
    [[WikiCalendar(wiki=/MyMeetingMinutes/%Y-%m-%d, base=MyMeetingMinutes)]]
    followed by some optional how-to text
    
  • PageTemplates/MyMeetingMinutes contains
    [[Include(MyMeetingMinutes)]]
    ... followed by whatever template I want for individual subpages
    

This way, each newly created subpage shows the content of the toplevel MyMeetingMinutes page, including the calendar, but with the patch proposed in this ticket, on the subpages, the subpage date will be set as the current date, which looks nice :)

And if I ever want to change the calendar options, I have one place to do it and all (existing) subpages will follow.

comment:3 Changed 8 years ago by Ryan J Ollos

Owner: changed from Steffen Hoffmann to Ryan J Ollos
Status: newaccepted

comment:4 Changed 7 years ago by Ryan J Ollos

Owner: Ryan J Ollos deleted
Status: acceptednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.