Notifications
Sign Up Sign In
Q&A

Can we get a page with the tags listed in hierarchical and then alphabetical order?

+4
−0

The hierarchies of tags are awesome, but its a little hard to see the relationship. Could we get a page where the tags are displayed like this,

  • Animals
    • Antelopes
    • Bears
      • Black Bears
      • Polar Bears
    • Birds
      • Bald Eagles
      • Robins
    • Bugs
      • Cicadas
    • Deer
    • Elk

From the top-level to child, and then alphabetized inside their category. This would make it a lot easier to ensure that the tags are grouped how I want them.

Why should this post be closed?

4 comments

@aCVn see the edit Charlie Brumbaugh about 1 month ago

Much clearer, thank you. aCVn about 1 month ago

I'll need to have a look at this one... The problem is that MySQL (well, relational databases in general) don't handle tree structures well at all. If there's a way that's been put in to do this, then I might be able to, but... I wouldn't like to get anyone's hopes up. ArtOfCode about 1 month ago

@ArtOfCode I don't think such a list needs to update in real time. Tag relationships probably wouldn't be changed all that often, so to batch-generate the data or even the whole page for something like this should be workable. O'Reilly's SQL Cookbook has a recipe that comes awful close to doing what this question suggests, with MySQL syntax. "Creating a Hierarchial View of a Table". The problem statement there: "you want to return a result set that describes the hierarchy of an entire table". aCVn about 1 month ago

1 answer

+2
−0

I surprise myself, but the answer is "yes you can".

Image alt text

There's a new Hierarchical sort button on tag list pages. You won't see much difference right now because not many tags have been made hierarchical, but no doubt we'll start to see some soon.

2 comments

I think it might be easier to read in a single column format https://outdoors.codidact.com/categories/5/tags?hierarchical=1 Charlie Brumbaugh about 1 month ago

I agree that this would probably be more usable with a single-column format. Still, nice! aCVn about 1 month ago

Sign up to answer this question »