Single article links
Using a custom micro-template you can show a link to just the previous or next article.
Using the properties
option described on the Article Navigation extension page you can provide additional information to the custom micro-template. Including additional properties for the built-in article navigation links can be done by adding a data-properties
attribute on the article navigation element:
{{~#isnt settings.article_navigation_style 'none'}}
<div
class="my-6"
data-element="article-navigation"
data-template="article-navigation"
data-properties='["id", "title", "body", "html_url", "position", "created_at", "category_id", "section_id", "draft"]'
data-next-title="{{#if settings.use_translations}}{{dc settings.next_article_title}}{{else}}{{settings.next_article_title}}{{/if}}"
data-previous-title="{{#if settings.use_translations}}{{dc settings.previous_article_title}}{{else}}{{settings.previous_article_title}}{{/if}}">
</div>
{{/isnt~}}
For example, you can fetch the article body
and use it to present an excerpt:
Article navigation link links are powered by our Article Navigation extension and can be added to the Article page using the Article navigation setting in the Article page elements setting group. The previous and next titles, which some patterns display, are also configurable through the Previous article navigation title and Next article navigation title settings, respectively.
On the Article page
Select an article navigation style other than None in theme settings to have the article navigation links appear on the Article page.
To replace the default layout, copy-and-paste the code of your selected pattern into the bottom of the footer.hbs
template.