-
- 8 Posts
We created an university website via ModX.
One question needs you help.
how to link "View All News" (on department pages) links to filtered news?
Currently, we used a chunk to show related news on department template, it works.
[[$xjtlu.latest-news-text-links-department? &blockId=`news` &department=`[[*id]]`]]
This is the chunk of xjtlu.latest-news-text-links-department
[[pdoResources?
&parents=`[[++newsId]]`
&limit=`4`
&tpl=`xjtlu.pr.latest-news-text-row`
&sortby=`{"publishedon":"DESC"}`
&where=`{"template:=":18}`
&toPlaceholder=`latestNews`
&includeTVList=`relatedDepartments`
&tvFilters=`relatedDepartments==%[[+department]]%`
]]
[[+latestNews:notempty=`
<div class="latest-news" [[+blockId:notempty=`id="[[+blockId]]" data-waypoint="[[+blockId]]"`]]>
<div class="contain">
<h2>[[%xjtlu_news? &language=`[[++cultureKey]]`]]</h2>
<ul>
[[+latestNews]]
</ul>
<p><a href="[[~[[++newsId]]]]" class="read-more"><span>[[%xjtlu_viewallnews? &language=`[[++cultureKey]]`]]</span></a></p>
</div>
</div><!--//.latest-news-->
`]]
I think we need to edit the following code,
<p><a href="[[~[[++newsId]]]]" class="read-more"><span>[[%xjtlu_viewallnews? &language=`[[++cultureKey]]`]]</span></a></p>
-
- 24,544 Posts
See what this gives you:
[[pdoResources?
&parents=`[[++newsId]]`
&limit=`20`
&tpl=`xjtlu.pr.latest-news-text-row`
&sortby=`{"publishedon":"DESC"}`
&where=`{"template:=":18}`
&toPlaceholder=`latestNews`
]]