Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-05-20 13:41:29

SPKuja
Member
From: England
Registered: 2013-05-18
Posts: 55
Website

List articles by Custom Field with RSS Unlimited Categories

Hey guys, I am currently using the plugin RSS Unlimited Categories, and I am trying to list articles based on a custom field. Basically, I want to show articles that have the same word in the YouTubeSeries custom field on a page. The code I am using at the moment is:

<txp:rss_unlimited_categories_article_list filterfield=“YouTubeSeries” form=“youtube_series” limit=“20” section=“articles” category=“youtube”/>

It works, only it isn’t showing just the articles with the same entry in the YouTubeSeries box, it shows all of them from the “youtube” category.

Any help would be greatly appreciated! Thanks!

Offline

#2 2014-05-20 13:45:21

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

Re: List articles by Custom Field with RSS Unlimited Categories

Looking at your code I see some smart quotes which are not necessarily being created by textile.

Just in case it is those try:

<txp:rss_unlimited_categories_article_list filterfield="YouTubeSeries" form="youtube_series" limit="20" section="articles" category="youtube"/>

Also, what do you have in the youtube_series form?


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 2014-05-20 13:51:20

SPKuja
Member
From: England
Registered: 2013-05-18
Posts: 55
Website

Re: List articles by Custom Field with RSS Unlimited Categories

Thanks for the quick reply :)

I did try it, it still does the same. At the moment, I only have the basics in the youtube_series form:

<txp:permlink><txp:article_image escape="" /></txp:permlink>

Offline

#4 2014-05-20 14:08:52

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

Re: List articles by Custom Field with RSS Unlimited Categories

Why do you use the escape in the article image? Don’t you just add an image number there?


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

Offline

#5 2014-05-20 15:12:05

SPKuja
Member
From: England
Registered: 2013-05-18
Posts: 55
Website

Re: List articles by Custom Field with RSS Unlimited Categories

I’m not using that code as the final, I’m just using it for testing purposes at the moment

Offline

#6 2014-05-20 15:23:36

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

Re: List articles by Custom Field with RSS Unlimited Categories

Ok but How do you populate the article_image field?


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

Offline

#7 2014-05-20 15:28:43

SPKuja
Member
From: England
Registered: 2013-05-18
Posts: 55
Website

Re: List articles by Custom Field with RSS Unlimited Categories

It does it based on the previous code, loading the articles from the defined categories/section. But I want it to filter out all that do not have an entry in the custom field.

The images are loading fine, it’s just loading all of the articles, not just the ones I’m specifying

Last edited by SPKuja (2014-05-20 15:31:05)

Offline

#8 2014-05-20 15:32:44

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

Re: List articles by Custom Field with RSS Unlimited Categories

OK but you did not respomd on How do you populate the article_image field? In any case you can try…

<txp:rss_unlimited_categories_article_list filterfield="YouTubeSeries" limit="20" section="articles" category="youtube"/><txp:permlink><txp:article_image /></txp:permlink></txp:rss_unlimited_categories_article_list>

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

Offline

#9 2014-05-20 15:38:51

SPKuja
Member
From: England
Registered: 2013-05-18
Posts: 55
Website

Re: List articles by Custom Field with RSS Unlimited Categories

Ah, beg your pardon, I mis read! I put the url for the image in the actual Article Image box when writing the article

Offline

#10 2014-05-20 16:00:23

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

Re: List articles by Custom Field with RSS Unlimited Categories

You do not need to put the url there. All you need is to put the id of the image.


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

Offline

#11 2014-05-20 16:03:50

SPKuja
Member
From: England
Registered: 2013-05-18
Posts: 55
Website

Re: List articles by Custom Field with RSS Unlimited Categories

Okay, thanks for the heads up, but that’s not what’s wrong with the mark up. For some reason it is ignoring the filter, I’ve even tried filterfield=“custom_21” Which is the fields custom number, as opposed to it’s name of YouTubeSeries

Offline

#12 2014-05-20 23:36:23

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

Re: List articles by Custom Field with RSS Unlimited Categories

I think you want to filter the custom field named YouTubeSeries (that is the filterfield). But I don’t see any value. How do you define the value? Through the filtername attribute? I don’t understand the help properly:

Tag Descrition Default Example
filter Indicates whether filtering is turned on. 0 filter=“1”
filterfield The field the articles are filtered on. filterfield=“custom_4”
filtername The URL keyword that preceeds the filter. For example, these attributes (filter=“1” filterfield=“custom_4” filtername=“byprice”) would filter this URL (/article/byprice/lt/3) and display articles where the value in the custom_4 field was less than 3. The valid URL operators are eq (equals), lt (less than) and gt (greater than). Filter URLs must be constructed manually at this point. filtername=“byprice”

Last edited by GugUser (2014-05-20 23:39:39)

Offline

Board footer

Powered by FluxBB