]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/todo/calendar_with___34__create__34___links/incomplete_patch.pl
Merge branch 'master' of ssh://git.ikiwiki.info
[git.ikiwiki.info.git] / doc / todo / calendar_with___34__create__34___links / incomplete_patch.pl
1 diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
2 index d443198..0436eda 100644
3 --- a/IkiWiki/Plugin/calendar.pm
4 +++ b/IkiWiki/Plugin/calendar.pm
5 @@ -238,7 +238,16 @@ EOF
6                         else {
7                                 $tag='month-calendar-day-nolink';
8                         }
9 -                       $calendar.=qq{\t\t<td class="$tag $downame{$wday}">$day</td>\n};
10 +                       if ($params{newpageformat}) {
11 +                               $calendar.=qq{\t\t<td class="$tag $downame{$wday}">};
12 +                               $calendar.=htmllink($params{page}, $params{destpage},
13 +                                       strftime_utf8($params{newpageformat}, 0, 0, 0, $day, $params{month} - 1, $params{year} - 1900),
14 +                                       noimageinline => 1,
15 +                                       linktext => $day);
16 +                               $calendar.=qq{</td>\n};
17 +                       } else {
18 +                               $calendar.=qq{\t\t<td class="$tag $downame{$wday}">$day</td>\n};
19 +                       }
20                 }
21         }
22  
23 diff --git a/doc/ikiwiki/directive/calendar.mdwn b/doc/ikiwiki/directive/calendar.mdwn
24 index cb40f88..7b7fa85 100644
25 --- a/doc/ikiwiki/directive/calendar.mdwn
26 +++ b/doc/ikiwiki/directive/calendar.mdwn
27 @@ -56,5 +56,9 @@ An example crontab:
28    and so on. Defaults to 0, which is Sunday.
29  * `months_per_row` - In the year calendar, number of months to place in
30    each row. Defaults to 3.
31 +* `newpageformat` - In month mode, if no articles match the query, the value of
32 +  `newpageformat` will be used to strformat the date in question. A good value
33 +  is `newpageformat="meetings/%Y-%m-%d"`. It might be a good idea to have
34 +  `\[[!meta date="<TMPL_VAR name>"]]` in the edittemplate of `meetings/*`.
35  
36  [[!meta robots="noindex, follow"]]