% node = config[:node]
parent_var = '@' + (node.children.any? { |n| n.name.pluralize == node.name } ? 'document' : node.name)
-%>
<%% @<%= node.name.pluralize %>.each do | <%= node.name %> | %>
<%%= link_to <%= node.name %>.title, document_path(<%= node.name %>) %>
<%%= <%= node.name %>.summary %>
<%%= <%= node.name %>.published_at %>
<%% end %>
<%%= paginate @<%= node.name.pluralize %>, :route => :document_path, :param_name => "#{@<%= node.name %>}_page", :theme => :twitter %>
<% end %>