Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-05-31 14:53:25

bashirnoori
Member
From: Afghanistan
Registered: 2012-10-02
Posts: 79

Article listing of a category to all sections

My categories are Security, Economy, Education and Sport.
My sections are News, Blog, and Articles.
Now if I want to add an article to the Security category in News section, it will not show in other sections like if I’m in the Blog section and Security category or Articles section and Security category, can’t see other sections articles.
So, I want to see the articles of Security in all (News,Blog,Articles) sections.
I have this code in my pages <txp:article time="any" section="news,blog,articles" form="article_listing" limit="20" /><txp:etc_pagination range="20" prev="Prev" next="Next" wraptag="ul" break="li" />

Offline

#2 2024-05-31 15:40:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Article listing of a category to all sections

I’m not sure if the article tag supports the section attribute. Try

<txp:article_custom time="any" section="news,blog,articles" form="article_listing" limit="20" />
<txp:etc_pagination range="20" prev="Prev" next="Next" wraptag="ul" break="li" />

Check that pagination works afterwards


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2024-05-31 16:33:19

bashirnoori
Member
From: Afghanistan
Registered: 2012-10-02
Posts: 79

Re: Article listing of a category to all sections

The following code, resolved the issue:

<txp:article_custom category="<txp:category title="0" />" time="any" section="news,blog,articles" form="article_listing" limit="20" />
<txp:etc_pagination range="20" prev="Prev" next="Next" wraptag="ul" break="li" />

Offline

Board footer

Powered by FluxBB