You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
734 B

<%
if (page.layout == 'page' || page.layout == 'post') {
var rows = new Array();
site.posts.each(function(post){
if ((post.short_title || post.title) && post.path && (post.group == item.id)) {
rows.push({name: post.short_title || post.title, url: post.path, order: (post.order || 0)})
}
})
site.pages.each(function(post){
if ((post.short_title || post.title) && post.path && (post.group == item.id)) {
rows.push({name: post.short_title || post.title, url: post.path, order: (post.order || 0)})
}
})
rows.sort(function(a,b){
return a.order - b.order;
});
item.rows = rows;
}
%>
<% if (item.rows && item.rows.length > 0) { %>
<%- partial('list', {item: item, where: where}) %>
<% } %>