Skip to content

Commit

Permalink
[TASK] use current page as list page, when listPid is not set (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
anjeylink authored and dmh committed Mar 13, 2019
1 parent c62a724 commit 9ddb216
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
27 changes: 21 additions & 6 deletions Resources/Private/Extensions/News/Templates/Category/List.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,10 @@
<f:if condition="{category.item.uid} == {overwriteDemand.categories}">
<f:then>
<t3kit:register key="additionalBreadCrumbItem" value="{category.item.title}"/>
<f:link.page title="{category.item.title}" class="active" pageUid="{settings.listPid}"
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">{category.item.title}
</f:link.page>
<f:render section="categoryLink" arguments="{category: category, class: 'active'}" />
</f:then>
<f:else>
<f:link.page title="{category.item.title}" pageUid="{settings.listPid}"
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">{category.item.title}
</f:link.page>
<f:render section="categoryLink" arguments="{category: category}" />
</f:else>
</f:if>

Expand All @@ -48,5 +44,24 @@
</div>
</f:section>

<f:section name="categoryLink">
<f:if condition="{settings.listPid}">
<f:then>
<f:link.page title="{category.item.title}"
class="{class}"
pageUid="{settings.listPid}"
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">
{category.item.title}
</f:link.page>
</f:then>
<f:else>
<f:link.page title="{category.item.title}"
class="{class}"
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">
{category.item.title}
</f:link.page>
</f:else>
</f:if>
</f:section>
</html>

22 changes: 16 additions & 6 deletions Resources/Private/Extensions/News/Templates/Tag/List.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@
<f:if condition="{tag.uid} == {overwriteDemand.tags}">
<f:then>
<t3kit:register key="additionalBreadCrumbItem" value="{tag.title}"/>
<f:link.page title="{tag.title}" class="active" pageUid="{settings.listPid}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
{tag.title}
</f:link.page>
<f:render section="tagLink" arguments="{tag: tag, class: 'active'}" />
</f:then>
<f:else>
<f:link.page title="{tag.title}" pageUid="{settings.listPid}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
{tag.title}
</f:link.page>
<f:render section="tagLink" arguments="{tag: tag}" />
</f:else>
</f:if>
</li>
Expand All @@ -34,5 +30,19 @@
</f:if>
</f:section>

<f:section name="tagLink">
<f:if condition="{settings.listPid}">
<f:then>
<f:link.page title="{tag.title}" class="{class}" pageUid="{settings.listPid}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
{tag.title}
</f:link.page>
</f:then>
<f:else>
<f:link.page title="{tag.title}" class="{class}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
{tag.title}
</f:link.page>
</f:else>
</f:if>
</f:section>
</html>

0 comments on commit 9ddb216

Please sign in to comment.