% layout 'main'; % title "View Thread - #$thread->{'id'}";

<%= title %>

<% if (my $thread_body = %$thread{'body'}) { =%>

<%= %$thread{'title'} %>

<%= %$thread{'date'} %>

<%= %$thread{'author'} %>

<%= $thread_body %>

<% } =%> <% if (my $first_remark = @$remarks[0]) { =%>
<% for my $remark (@$remarks) { =%>

<%= %$remark{'date'} %>

<%= %$remark{'author'} %>

<%= %$remark{'body'} %>

<% } =%>
<% } =%>