Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
Re: Dev news
etc wrote #319804:
This commit introduces two new permlink modes:
section/category/title
and more verbosebreadcrumb/title
. Now, if your category tree containsanimals/cats
path, the permlink ofgarfield
article withcats
category fromcomics
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
Offline
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
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
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
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 usesection/title
).
Interesting. This could be possible if we attach some permlink_mode
field to sections.
Offline
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
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
Offline