<div id="reply-content">
Hi,
</div><div id="reply-content"><br></div><div id="reply-content">I Like the idea, as it helps decoupling between views and files, which ate not always the same. </div><div id="reply-content"><br></div><div id="reply-content">Can you provide a patch for either dancer 1 or ( preferably ) dancer 2 ?</div><div id="reply-content"><br></div><div id="reply-content">Thanks :)</div>
<div id="374FDED0293B4FD09DB5CDC173561D7B"></div>
<p style="color: #A0A0A8;">Le jeudi 27 décembre 2012 à 23:30, Rolf Schaufelberger a écrit :</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<div id="quoted-message-content"><div><div>Hi, </div><div>after reading some articles on the dancer advent calendar I started to examine dance in order to see, if I can replace my current MasonX::WebApp application with dancer. </div><div>So I installed dancer 1.3 , and since I use Mason, I installed Dancer::Template::Mason. </div><div><br></div><div>Now I found , that auto_page bypasses the template engine by checking, if a specific template exists , and that behavior its still present in Dancer2.</div><div><br></div><div>In Dancer1 the code in Dancer::Renderer is </div><div><br></div><div> my $view = Dancer::engine('template')->view($viewpath) || '';</div><div><br></div><div> if ($view && -f $view) {</div><div><br></div><div>and in Dancer 2 in Dancer::Handler::AutoPage</div><div><br></div><div> my $view_path = $template->view($page);</div><div> if (! -f $view_path) {</div><div><br></div><div><br></div><div>In Dancer::Template::Abstract a method "view_exists " exists , so why not use this? </div><div>For Dancer1 the docs tells, override this function in your template class accordingly. </div><div>But for auto_page, the template class is not asked if a template exists, and in my opinion,</div><div>this behavior is not correct. </div><div>What do you think about this ?</div><div><br></div><div>Rolf</div><div><br></div><div><br></div><div><br></div><div>_______________________________________________</div><div>dancer-users mailing list</div><div>dancer-users@dancer.pm</div><div>http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</div></div></div>
</blockquote>
<div>
<br>
</div>