Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2022-04-27 14:16:34
- Erni
- New Member
- Registered: 2022-04-27
- Posts: 4
Custom sorting/order by category
Hi,
I would like to create my own sort of categories (at a specific level).
Example in category tree:- A
- B
- A
- B
- C
- Y
- Z
- C
- C
- B
- C
- A
- Z
- B
- Y
- A
How I can do it? In database i can’t saw column `position` or `order`.
Offline
Re: Custom sorting/order by category
Hi erni and welcome!
Try the plugin esq_sectionsort. It adds a sectionsort and categorysort column and a corresponding drag-and-drop capability for both sections and categories. You can then sort your output by the “categorysort”.
TXP Builders – finely-crafted code, design and txp
Offline
#3 2022-04-27 14:49:55
- Erni
- New Member
- Registered: 2022-04-27
- Posts: 4
Re: Custom sorting/order by category
jakob wrote #333169:
Try the plugin esq_sectionsort.
I try but this plugin not working (in admin panel -> Content -> section Category i can’t saw new options to sorting items).
Database `category` after installation “esq_sectionsort” have new column `categorysort` but options to sorting in Category Tree doesn’t exists.
PS: In “Presentation -> Section” options to sorting is exists.
Offline
Re: Custom sorting/order by category
I found the problem and will update it shortly.
TXP Builders – finely-crafted code, design and txp
Offline
#5 2022-04-27 15:30:09
- Erni
- New Member
- Registered: 2022-04-27
- Posts: 4
Re: Custom sorting/order by category
jakob wrote #333171:
I found the problem and will update it shortly.
My version Textpattern CMS (v4.8.8)
Offline
Re: Custom sorting/order by category
Try this version. The incompatibility that arose is with PHP 8 I think. There’s some more streamlining to do but this should work.
[ removed – please see the GitHub Repo ]
TXP Builders – finely-crafted code, design and txp
Offline
#7 2022-04-27 17:50:58
- Erni
- New Member
- Registered: 2022-04-27
- Posts: 4
Re: Custom sorting/order by category
jakob wrote #333173:
Try this version. The incompatibility that arose is with PHP 8 I think. There’s some more streamlining to do but this should work.
Thanks for the quick support! Now plugin doing great. Can I enable “debug mode” and check errors from this and other plugins?
Offline
Re: Custom sorting/order by category
Erni wrote #333174:
Thanks for the quick support! Now plugin doing great. Can I enable “debug mode” and check errors from this and other plugins?
Yes. The plugin doesn’t have any front end tags, just the additional sort values for sections and customs.
I’ve cleaned the plugin up a bit and made a few more updates – removed duplicate code, added plugin help, corrected feedback notification formatting. You can find it here: esq_sectionsort v2.0.5.
TXP Builders – finely-crafted code, design and txp
Offline
Pages: 1