Permalink
Browse files

display per-channel link blocks on the channel index too

  • Loading branch information...
moritz committed Apr 4, 2012
1 parent 8404c3b commit b310d25001279b9907e03c308f92be4eb6cd7163
Showing with 7 additions and 0 deletions.
  1. +6 −0 cgi/channel-index.pl
  2. +1 −0 cgi/template/channel-index.tmpl
View
@@ -63,6 +63,12 @@ sub get_channel_index {
$t->param(CHANNEL => $channel);
$t->param(BASE_URL => $base_url);
$t->param(CALENDAR => calendar_for_channel($channel, $dates, $base_url));
+
+ my $clf = "channels/$channel.tmpl";
+ if (-e $clf) {
+ $t->param(CHANNEL_LINKS => q{} . read_file($clf));
+ }
+
return $t->output;
}
@@ -11,6 +11,7 @@
<body>
<h1>IRC logs - Index for #<TMPL_VAR CHANNEL></h1>
+ <TMPL_VAR NAME=CHANNEL_LINKS DEFAULT="">
<TMPL_INCLUDE linkblock.tmpl>
<h2 id="<TMPL_VAR CHANNEL>">#<TMPL_VAR CHANNEL></h2>

0 comments on commit b310d25

Please sign in to comment.