Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2025-08-07 03:44:21

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

Re: if_first_image

It’s really strange, as I was thinking of the if_first_article tag last night, and implemented it this morning.

Here’s the final snippet


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

Offline

#14 2025-08-07 12:05:08

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

Re: if_first_image

For the record, you can spare some time/memory by replacing

<txp:article_custom section="projects,about" pubs limit="999" break=","><txp:article_id /></txp:article_custom>

with

<txp:article_custom section="projects,about" pubs fields="list(thisid)"><txp:article_id /></txp:article_custom>

Offline

#15 2025-08-08 02:47:49

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

Re: if_first_image

etc wrote #340086:

For the record, you can spare some time/memory

<txp:article_custom section="projects,about" pubs fields="list(thisid)"><txp:article_id /></txp:article_custom>...

Thanks so much Oleg, I did it and works just fine. I was not aware of the fields attribute which is also not documented under the article tags.


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

Offline

#16 2025-08-08 09:18:56

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

Re: if_first_image

colak wrote #340087:

I was not aware of the fields attribute which is also not documented under the article tags.

It is outlined here, so anybody having time to document it, please be my guest.

Offline

#17 2025-08-09 03:40:18

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

Re: if_first_image

etc wrote #340089:

It is outlined here, so anybody having time to document it, please be my guest.

Just did. github.com/textpattern/textpattern.github.io/blob/master/tags/article_custom.md. Somebody please edit me.


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

Offline

#18 2025-08-09 08:31:47

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

Re: if_first_image

Thanks Yiannis, that’s the way I like it! The fields attribute is still missing in the list, will add it.

Offline

#19 2025-08-09 08:40:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,833
Website GitHub

Re: if_first_image

That’s ace. Before we go too far, can someone please confirm the changes have synced? I have a feeling that the master branch is outdated and the self-hosted branch is the one that our live docs use now.

The commits might need merging into self-hosted so they show up. I haven’t checked.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#20 Yesterday 01:52:07

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

Re: if_first_image

Bloke wrote #340098:

That’s ace. Before we go too far, can someone please confirm the changes have synced? I have a feeling that the master branch is outdated and the self-hosted branch is the one that our live docs use now.

The commits might need merging into self-hosted so they show up. I haven’t checked.

Hi stef,
The edits have not merged with the docs subdomain.


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

Offline

#21 Yesterday 06:24:54

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,359
Website GitHub Mastodon

Re: if_first_image

colak wrote #340087:

I was not aware of the fields attribute which is also not documented under the article tags.

I was not aware of the pubs attribute which is also not documented under the article tags. Then I awoke and, by reading the initial post of this thread, learned that pubs is a custom field’s name.

Is this ‘custom field name to attribute propagation’ global knowledge to everyone but me, or present in the docs at a place a fail to find, or would this also deserve a new mention in the docs?

Offline

#22 Yesterday 06:38:43

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

Re: if_first_image

wet wrote #340101:

I was not aware of the pubs attribute which is also not documented under the article tags. Then I awoke and, by reading the initial post of this thread, learned that pubs is a custom field’s name.

Is this ‘custom field name to attribute propagation’ global knowledge to everyone but me, or present in the docs at a place a fail to find, or would this also deserve a new mention in the docs?

You are absolutely right! I cannot find it either. Added.


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

Offline

#23 Yesterday 11:13:34

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,359
Website GitHub Mastodon

Re: if_first_image

Offline

#24 Yesterday 14:16:13

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

Re: if_first_image

wet wrote #340103:

PRBFP: s/polulated/populated

Corrected:)


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