私は 2 種類の作品を持っています。1 つはAuthorsで、2 番目はArticlesです。Apostrophe's Demoに実装されているように、記事のリストを ( and を使用indexAjax.htmlして)index.html表示することができます。articles-pagesindexAjax.htmlindex.htmlauthors-pages/views
show.html私の質問は、特定の著者が書いた記事をfile ofを使用して表示するにはどうすればよいauthors-pages/viewsですか?
したがって、ユーザーが著者をクリックすると、指定した著者によって書かれた記事のリストが表示されるはずです。
lib/modules/articles/index.jsファイルは以下
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
}
}
},
....
]
};
どんな助けでも大歓迎です!