Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2019-10-22 10:01:04

etc
Developer
Registered: 2010-11-11
Posts: 3,427
Website

Dev news

The evenings are getting longer and we spend more time on txp development. Since not everyone regularly follows the dev branch on GitHub, I thought it wouldn’t hurt to announce the main news in a dedicated thread on the forum.

Please tell us what you think, we need txp users opinion on upcoming features before (if ever) they become official. Thanks!

Offline

#2 2019-10-22 10:01:58

etc
Developer
Registered: 2010-11-11
Posts: 3,427
Website

Re: Dev news

This commit introduces a depth attribute of <txp:article(_custom) />. Its purpose is to enable “in depth” category filters. For example, if your category tree contains a animals/cats|dogs|etc branch, calling <txp:article_custom category="animals" depth="1" /> will match all articles with cats, dogs, etc categories. If you wish to include their animal parent too, call

<txp:article_custom category="animals" depth="0-1" />

To include the whole animals branch with all descendants, use valueless depth:

<txp:article_custom category="animals" depth />

The feature looks useful, but I’m unsure about the attribute name: is depth appropriate here?

Offline

#3 2019-10-22 10:03:16

etc
Developer
Registered: 2010-11-11
Posts: 3,427
Website

Re: Dev news

This commit introduces two new permlink modes: section/category/title and more verbose breadcrumb/title. Now, if your category tree contains animals/cats path, the permlink of garfield article with cats category from comics section will be respectively

comics/cats/garfield

and

comics/animals/cats/garfield

We have been asked for this few years ago, but is it still of any interest?

Offline

#4 2019-10-22 10:24:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,381
Website

Re: Dev news

etc wrote #319804:

This commit introduces two new permlink modes: section/category/title and more verbose breadcrumb/title. Now, if your category tree contains animals/cats path, the permlink of garfield article with cats category from comics section will be respectively

comics/cats/garfield...

and

comics/animals/cats/garfield...

We have been asked for this few years ago, but is it still of any interest?

Yes!!!! :) Thank you, thank you, thank you!!!


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#5 2019-10-22 10:38:30

etc
Developer
Registered: 2010-11-11
Posts: 3,427
Website

Re: Dev news

colak wrote #319808:

Yes!!!! :)

Great, that’s not bloat then!

Offline

#6 2019-10-22 10:58:48

etc
Developer
Registered: 2010-11-11
Posts: 3,427
Website

Re: Dev news

This commit introduces the search by custom fields via GET/POST parameters. Say, if you use some colour and size custom fields, you can allow the site visitors to search for red 33 via some HTML form or URL like

?colour=red&size=33

by setting match attribute of <txp:article(_custom) />:

<txp:article match="colour, size" />

Offline

#7 2019-10-22 11:28:57

towndock
Member
From: Oriental, NC USA
Registered: 2007-04-06
Posts: 282
Website

Re: Dev news

I like it a lot. In your examples, the term “depth” makes sense. The section/category/title permalink will be useful. I’m not imagining a multi level category tree use yet, but I like having it in the toolbox.

These abilities may not be used at all on most simple sites, but on some complex sites I do this is just the kind of magic that makes Textpattern the one.

Offline

#8 2019-10-22 11:47:29

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,759
Website

Re: Dev news

If I understand the feature correctly, “depth” is a good name I think. And together with Colak, a “yes!” for the permalinks.

(Hmm yesterday I was kinda wondering about that in a way, that is having one section use something like you propose with — section/category/title, while all the other sections would use section/title).

Offline

#9 2019-10-22 12:05:25

etc
Developer
Registered: 2010-11-11
Posts: 3,427
Website

Re: Dev news

towndock wrote #319815:

I like it a lot. In your examples, the term “depth” makes sense.

phiw13 wrote #319816:

If I understand the feature correctly, “depth” is a good name I think.

Thanks, appreciated. Just mind that this would clash with an eventual custom field named depth, but we have to do something about it anyway.

(Hmm yesterday I was kinda wondering about that in a way, that is having one section use something like you propose with — section/category/title, while all the other sections would use section/title).

Interesting. This could be possible if we attach some permlink_mode field to sections.

Offline

#10 2019-10-22 12:10:00

etc
Developer
Registered: 2010-11-11
Posts: 3,427
Website

Re: Dev news

If you don’t need all the bells and whistles1 of etc_pagination, this commit empowers <txp:newer|older /> tags with pagination bar abilities. You can easily construct basic navigation blocks like

First page ... Page 4 Page 5 Page 6 ... Last page

via already existing but undocumented shift attribute and new link and break attributes.

1 subliminal advertisement

Offline

Board footer

Powered by FluxBB