From b602615194297fcd90d15919bcc3fb3695354b13 Mon Sep 17 00:00:00 2001 From: uriel Date: Fri, 29 Aug 2008 00:57:40 +0200 Subject: [PATCH] Handle shared pub/ .tpl properly --- bin/controller.rc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/controller.rc b/bin/controller.rc index b82442a..f93c350 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -185,6 +185,7 @@ fn debug_handler { fn select_handler { +dprint $body if (test -f $body.md) { if (! ~ $#inBlog 0) set_handler blog_post_handler $body.md @@ -209,8 +210,8 @@ fn select_handler { blogDirs = `{basename -d $body} # Global tpl (eg sitemap.tpl) - if not if (test -f pub/^$body^.tpl) - set_handler tpl_handler pub/^$body^.tpl + if not if (test -f pub/^$uri^.tpl) + set_handler tpl_handler pub/^$uri^.tpl if not if (test -f $body.txt) set_handler txt_handler $body.txt