Skip to content

Commit

Permalink
[FEATURE] Add backlinks to overview for post listings
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Nov 17, 2020
1 parent 54d701d commit c4bec3d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 5 deletions.
12 changes: 12 additions & 0 deletions Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@
<trans-unit id="list.no_posts.message" xml:space="preserve">
<source>This list contains no blog posts.</source>
</trans-unit>
<trans-unit id="list.backlink.authors" xml:space="preserve">
<source>Back to Authors</source>
</trans-unit>
<trans-unit id="list.backlink.categories" xml:space="preserve">
<source>Back to Categories</source>
</trans-unit>
<trans-unit id="list.backlink.tags" xml:space="preserve">
<source>Back to Tags</source>
</trans-unit>
<trans-unit id="list.backlink.archive" xml:space="preserve">
<source>Back to Archive</source>
</trans-unit>

<!-- Backend -->
<trans-unit id="backend.headline.setup_wizard" xml:space="preserve">
Expand Down
9 changes: 9 additions & 0 deletions Resources/Private/Templates/Post/ListPostsByAuthor.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ <h1 class="blogarchiveheader__title">
</f:if>
</header>
<f:render partial="List" arguments="{_all}" />
<f:if condition="{settings.authorUid}">
<footer class="blogarchivefooter blogarchivefooter--author">
<div class="blogarchivefooter__backlink">
<f:link.page pageUid="{settings.authorUid}">
<f:translate key="list.backlink.authors" />
</f:link.page>
</div>
</footer>
</f:if>

</f:then>
<f:else>
Expand Down
15 changes: 13 additions & 2 deletions Resources/Private/Templates/Post/ListPostsByCategory.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,20 @@ <h1 class="blogarchiveheader__title">
</div>
</header>
<f:render partial="List" arguments="{_all}" />
<f:if condition="{category.content}">
<f:if condition="{settings.categoryUid} || {category.content}">
<footer class="blogarchivefooter blogarchivefooter--category">
<f:cObject typoscriptObjectPath="lib.blog.contentElementRendering">{category.contentElementUidList}</f:cObject>
<f:if condition="{settings.categoryUid}">
<div class="blogarchivefooter__backlink">
<f:link.page pageUid="{settings.categoryUid}">
<f:translate key="list.backlink.categories" />
</f:link.page>
</div>
</f:if>
<f:if condition="{category.content}">
<div class="blogarchivefooter__content">
<f:cObject typoscriptObjectPath="lib.blog.contentElementRendering">{category.contentElementUidList}</f:cObject>
</div>
</f:if>
</footer>
</f:if>

Expand Down
9 changes: 9 additions & 0 deletions Resources/Private/Templates/Post/ListPostsByDate.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ <h1 class="blogarchiveheader__title">
</h1>
</header>
<f:render partial="List" arguments="{_all}" />
<f:if condition="{settings.authorUid}">
<footer class="blogarchivefooter blogarchivefooter--archive">
<div class="blogarchivefooter__backlink">
<f:link.page pageUid="{settings.archiveUid}">
<f:translate key="list.backlink.archive" />
</f:link.page>
</div>
</footer>
</f:if>

</f:then>
<f:else>
Expand Down
14 changes: 11 additions & 3 deletions Resources/Private/Templates/Post/ListPostsByTag.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ <h1 class="blogarchiveheader__title">
</div>
</header>
<f:render partial="List" arguments="{_all}" />
<f:if condition="{tag.content}">
<f:if condition="{settings.tagUid} || {tag.content}">
<footer class="blogarchivefooter blogarchivefooter--tag">
<f:cObject typoscriptObjectPath="lib.blog.contentElementRendering">{tag.contentElementUidList}</f:cObject>
<f:if condition="{tag.content}">
<f:cObject typoscriptObjectPath="lib.blog.contentElementRendering">{tag.contentElementUidList}</f:cObject>
</f:if>
<f:if condition="{settings.tagUid}">
<div class="blogarchivefooter__backlink">
<f:link.page pageUid="{settings.tagUid}">
<f:translate key="list.backlink.tags" />
</f:link.page>
</div>
</f:if>
</footer>
</f:if>

</f:then>
<f:else>

Expand Down

0 comments on commit c4bec3d

Please sign in to comment.