28 lines
854 B
Plaintext
Executable File
28 lines
854 B
Plaintext
Executable File
<%
|
|
if (page.layout == 'page' || page.layout == 'docs' || page.layout == 'post') {
|
|
var rows = new Array();
|
|
site.posts.each(function(p){
|
|
if (p.path && (p.group == item.id)) {
|
|
if ((p.short_title != false || (p.short_title == undefined && p.title))) {
|
|
rows.push({name: p.short_title || p.title, url: p.path, order: (p.order || 0)})
|
|
}
|
|
}
|
|
})
|
|
site.pages.each(function(p){
|
|
if (p.path && (p.group == item.id)) {
|
|
if ((p.short_title != false || (p.short_title == undefined && p.title))) {
|
|
rows.push({name: p.short_title || p.title, url: p.path, order: (p.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}) %>
|
|
<% } %>
|