% if(is_home() || is_category() || is_archive() || is_tag() || page.layout == 'list') {
var isPostList = true;
} else {
var isPostList = false;
}
var topMetas;
if (isPostList) {
topMetas = theme.layout.on_list.meta || [];
} else {
topMetas = theme.layout.on_page.meta.header || [];
}
if (post.meta && (post.meta.header !== undefined && post.meta.header !== null)) {
if (post.meta.header.length) {
topMetas = post.meta.header;
} else {
topMetas = [];
}
}
var bottomMetas;
if (isPostList) {
bottomMetas = [];
} else {
bottomMetas = theme.layout.on_page.meta.footer || [];
}
if (post.meta && (post.meta.footer !== undefined && post.meta.footer !== null)) {
if (post.meta.footer.length) {
bottomMetas = post.meta.footer;
} else {
bottomMetas = [];
}
}
%>
<% if (position == 'header') { %>
<% } else if (position == 'footer') { %>
<% } %>