Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2021-05-05 11:26:00

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 240
Website GitHub Mastodon

Re: How about newsletter

Sorry Stef, did not see your message :/
I tried your suggestion, with no luck.
The <txp:if_article_category> is working, but it won’t spit out the meta :(

Offline

#17 2021-05-05 11:26:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,498
Website GitHub

Re: How about newsletter

See my edit above :)

And syntax highlighting is done by using bc. html then a newline, then your code. or bc. php if it’s PHP code. There are others available.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#18 2021-05-05 11:48:38

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 240
Website GitHub Mastodon

Re: How about newsletter

Yay !! You’re the best :D
And you don’t need the type=category" either.

Offline

#19 2021-05-05 14:58:31

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

Re: How about newsletter

planeth wrote #330036:

Oh and BTW and not at all related: how do you format your block code to have it syntax highlighted?

As Stef said. You can also have bc. txp, bc. js, or bc. css. I’m not sure which other ones are supported


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

Offline

#20 2021-05-05 15:35:47

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 240
Website GitHub Mastodon

Re: How about newsletter

Oh, great !Thanks :)

Offline

#21 2021-05-05 22:54:53

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: How about newsletter

colak wrote #330040:

You can also have bc. txp, bc. js, or bc. css. I’m not sure which other ones are supported

Full list of supported formats under the heading “Displaying code blocks” on the forum help page.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#22 2021-05-06 13:32:16

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

Re: How about newsletter

Bloke wrote #330035:

You’d need trickery – possibly via <txp:evaluate> – if you want to consider both category1 and category2.

Probably no trickery is needed:

<txp:category_list categories='<txp:category1 />,<txp:category2 />'>
    <txp:meta_description format="" />
</txp:category_list>

Offline

#23 2021-05-06 13:45:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,498
Website GitHub

Re: How about newsletter

Oops, bad choice of phrase. I meant either sorry. For those situations where you don’t want to display both sets of metadata but want to choose one of them – whichever had metadata filled in first or was from a given parent or something.

It’s all very well telling a site’s authors to choose cat x, y, or z for category1 and cat a, b, or c for category2 when they create an article, but people will forget and assign the wrong one. Coding around that isn’t trivial.

Anyway, yep, if you want both to be output, that’s just the ticket.

Last edited by Bloke (2021-05-06 13:45:49)


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB