Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2014-05-21 10:14:51

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

Re: List articles by Custom Field with RSS Unlimited Categories

From my understanding, the value that you put in the custom field, in this case YouTubeSeries, when writing the article would be what it uses to apply the filter. Though, I have managed to get it working using the normal <txp:article_custom> tag, it’s a little messy but it works:

<txp:article_custom limit=“20” form=“youtube_series” YouTubeSeries=”<txp:custom_field name=“YouTubeSeries” />” sort=“posted asc” />

Offline

#14 2014-05-21 10:25:20

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

Note thee single quotes

<txp:article_custom limit="20" form="youtube_series" YouTubeSeries='<txp:custom_field name="YouTubeSeries" />' sort="posted asc"  />

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

Offline

#15 2014-05-21 13:16:05

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

Re: List articles by Custom Field with RSS Unlimited Categories

@Colak

Your example is without the mentioned plugin. Do you know if this works with categories created by rss_unlimited_categories? And it seems to me that YouTubeSeries='<txp:custom_field name="YouTubeSeries" />' makes no sense. It selects any article with any YouTubeSeries custom field content. Or am I wrong?

Offline

#16 2014-05-21 15:44:16

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

Do you know if this works with categories created by rss_unlimited_categories?

No. I never used or tested the plugin. All I saw there was a tag within a tag which requires single quotes during parsing.


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

Offline

#17 2014-05-21 16:09:04

etc
Developer
Registered: 2010-11-11
Posts: 5,388
Website GitHub

Re: List articles by Custom Field with RSS Unlimited Categories

GugUser wrote #280967:

And it seems to me that YouTubeSeries='<txp:custom_field name="YouTubeSeries" />' makes no sense. It selects any article with any YouTubeSeries custom field content. Or am I wrong?

Tags’ attributes are parsed before and independently of the tag itself, so this perfectly makes sense: <txp:custom_field name="YouTubeSeries" /> will take it’s value from the current article outside <txp:article_custom />.

Offline

#18 2014-05-21 17:09:23

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

Re: List articles by Custom Field with RSS Unlimited Categories

etc wrote #280971:

(…) will take it’s value from the current article outside <txp:article_custom />.

But, which value?

Offline

#19 2014-05-21 17:37:32

etc
Developer
Registered: 2010-11-11
Posts: 5,388
Website GitHub

Re: List articles by Custom Field with RSS Unlimited Categories

GugUser wrote #280972:

But, which value?

The value of the calling article’s YouTubeSeries. If you call it inside an article with YouTubeSeries equal to “Friends”, <txp:article_custom YouTubeSeries='<txp:custom_field name="YouTubeSeries" />' /> will be finally parsed as <txp:article_custom YouTubeSeries='Friends' />. That’s different from

<txp:article_custom>
<txp:if_custom_field name="YouTubeSeries" value='<txp:custom_field name="YouTubeSeries" />'>
...
</txp:if_custom_field>
</txp:article_custom>

that will output all articles, as you rightly state above.

Offline

#20 2014-05-22 02:08:59

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

Re: List articles by Custom Field with RSS Unlimited Categories

I think we are discussing two different things. I know how the article and the article_custom tags work. But the question at the beginning was in reference to the rss_unlimited_categories plugin.

And for the both mentioned Textpattern tags we can work with the customfieldname=“value” attribute.

Offline

#21 2014-05-22 04:34:50

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

Would this work?

<txp:rss_unlimited_categories_article_list filterfield="YouTubeSeries" limit="20" section="articles" category="youtube" wraptag="ul"/>
<txp:variable name="utube" value='<txp:custom_field name="YouTubeSeries">'/>
<txp:if_variable name="utube" value="somevalue">
<li><txp:permlink><txp:article_image /><txp:permlink></li>
</txp:if_variable>
</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

Board footer

Powered by FluxBB