I have two type of pieces one is Authors and second one is Articles. I can show the list of articles (by using indexAjax.html
and index.html
in articles-pages
) as it is implemented in Apostrophe's Demo and the list of Authors as well (by using indexAjax.html
and index.html
in authors-pages/views
).
My question is how can I show the articles written by some specified author in by using show.html
file of authors-pages/views
?
So when user clicks on some author he/she should be able to see the list of articles written by the specified author.
The lib/modules/articles/index.js
file is the following
module.exports = {
extend: 'apostrophe-pieces',
name: 'articles',
label: 'Article',
pluralLabel: 'Articles',
contextual: true,
addFields: [
{
name: '_author',
type: 'joinByOne',
withType: 'author',
label: 'Author',
idField: 'author',
filters: {
projection: {
title: 1,
slug: 1,
type: 1,
tags: 1
}
}
},
....
]
};
Any help will be appreciated!