% rebase('frame.tpl')
{{!entry}}
% include diary-boxes.tpl
% if len(recommends) > 0:

more like this...

% end
% if len(recommends) > 0: % for s in recommends: % end % end