parent
ea99e19d98
commit
aadbcd8f65
7 changed files with 77 additions and 15 deletions
@ -0,0 +1,23 @@ |
||||
<% |
||||
if ((page.layout == 'page' || page.layout == 'post') && page.group && page.group.length > 0) { |
||||
var rows = new Array(); |
||||
site.posts.each(function(post){ |
||||
if (post.title && post.path && (post.group == page.group)) { |
||||
rows.push({name: post.title, url: post.path, order: (post.order || 0)}) |
||||
} |
||||
}) |
||||
site.pages.each(function(post){ |
||||
if (post.title && post.path && (post.group == page.group)) { |
||||
rows.push({name: 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}) %> |
||||
<% } %> |
@ -0,0 +1,9 @@ |
||||
<% |
||||
if (item.rows == undefined) { |
||||
item.rows = page.references; |
||||
} |
||||
%> |
||||
|
||||
<% if (item.rows && item.rows.length > 0) { %> |
||||
<%- partial('list', {item: item, where: where}) %> |
||||
<% } %> |
Loading…
Reference in new issue