Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Core development
  3. » Dev news

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

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

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: 5,211
Website GitHub

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: 5,211
Website GitHub

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: 9,091
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

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

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

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: 5,211
Website GitHub

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: 329
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: 3,210
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).


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

Offline

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

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

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: 5,211
Website GitHub

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

#11 2019-10-22 12:10:10

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,379
Website GitHub Mastodon

Re: Dev news

etc wrote #319818:

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

That is something I have wanted for, oh, about, 15 years.

And I think all of these are things that could be useful.

Offline

#12 2019-10-22 12:23:52

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

Re: Dev news

michaelkpate wrote #319820:

That is something I have wanted for, oh, about, 15 years.

And I think all of these are things that could be useful.

Thanks! I hope the wait will be over soon, though messy mode seems to be tough to mix with others.

Offline

  1. Index
  2. » Core development
  3. » Dev news

Board footer

Powered by FluxBB