Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of categories in article view #61

Open
cdaecke opened this issue Jun 26, 2015 · 5 comments
Open

Order of categories in article view #61

cdaecke opened this issue Jun 26, 2015 · 5 comments

Comments

@cdaecke
Copy link

cdaecke commented Jun 26, 2015

First of all, thanks for the usefulle and great extension! I appreciate it a lot.

Now my questions:
I display the categories for a new entry ussing following code in the template:
echo implode(', ', $this->categoriesList);
This gives me the right categories, but sometimes in the wrong order.

This is my category tree:

  • level01
    -- level01_1
    -- level01_2
    -- level01_3
    -- level01_4
  • level02
    -- level02_1
    -- level02_2
    -- level02_3
  • level03
    -- level03_1
    -- level03_2
    -- level03_3

Now when I assign "level01_1", "level02_1" and "level03_1" the oder is correct. It will show "level01_1, level02_1, level03_1" for the news entry.

But when I assign "level01_4", "level02_2" and "level03_3" the displayd order is wrong. It will show "level02_2, level03_3, level01_4", but I would expect "level01_4, level02_2, level03_3".

So I come to the conclusion, that the oder of the second level is used for odering and not the parent level.

@qzminski
Copy link
Member

qzminski commented Jul 8, 2015

At the moment the sorting is done alphabetically from A to Z. I will consider changing it in the next major release.

@qzminski qzminski added this to the 3.0.0 milestone Jul 8, 2015
@qzminski qzminski modified the milestones: 3.0.0, 3.1.0 Nov 23, 2017
@qzminski qzminski removed this from the 3.1.0 milestone Feb 8, 2019
@jankout
Copy link

jankout commented Oct 22, 2020

Hello,

is there any news about this topic? I would appreciate a lot having this logic too. In my case, I would like to output only the first category in some templates. But with the current solution, it isn't possible.

Maybe it would be nice to have the sorting on the first level (news settings) like in this extension - https://github.com/marebe1602/mae_event_categories. What do you think?

@qzminski
Copy link
Member

I will likely be unable to provide the feature this year. However, if you are willing to sponsor it or provide a PR – you're very much welcome 🙂

@jankout
Copy link

jankout commented Oct 22, 2020

How much will it cost?

@qzminski
Copy link
Member

Please contact me at [email protected] 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants