Nested/hierarchical tags, subtags

As recently discussed on Slack, hierarchical tags and subtags would be very useful for tags like:

  • United States > California > San Francisco
  • People > Philosophers > Bertrand Russell
    etc.

That would allow links to parent and children tags from the tag pages. Just that would be enough and great, there is no need for long nested URLs with multiple tags, the current URLs are OK in the case of tags. (Of course more general publishing channels or sections like “News”, “Opinion”, etc. would be a different, complementary case with specific channel URLs).

All what is needed for the hierarchical tags functionality is the parent_id field that already exists -though not yet used- in Ghost’s tags database table, and also people hopefully contributing pull requests to make possible the use of the parent_id field.

The PRs to use the parent_id field could create, for example, a “Parent” input field for tags in admin, an e.g. tagTree object in memory with parents and children, and {{parent_tag}} and {{children_tags}} helpers for the tag links on theme templates. That would be one of the possible ways.

Nice - we’re definitely going to do this!

12 Likes

I’d love to see this. I have a couple of tags that are “version specific” like “Visual Studio > Visual Studio 2017” I’d live to be able to show the list of child tags and their featured posts (similar to the end-of post jump list in casper) on every tag page.

Similarly I’d expect that the end-of-post jump list would also show child tags and featured posts there where there aren’t any recent posts in the parent tag.

3 Likes

great idea!

Another vote for nested tags! Hugely valuable for blogs with tons of content.

I’m out of votes (maybe the system needs a check, I had very few votes from the very start, about 4 or so, and several months later I still don’t get any additional votes to use) but I also want to support this idea.

I assume it will be part of the custom channels functionality but, ayways, hierarchical taxonomies is something that I’m very much looking forward to.

1 Like

This is now in progress

5 Likes

Hi there - is there any way I’d be able to manually implement this functionality before the official upgrade, eg with dynamic routing? The other idea I thought of was installing multiple instances of Ghost in subdirectories, eg mysite.com/blog1 and mysite.com/blog2, and then including the tag name in the url, which would give the effect of nested tags (eg mysite.com/blog1/myfirsttag). However, would it be possible to easily merge the blogs once subtags was officially implemented or would I be stuck with the workaround of running multiple instances of Ghost?
If the official upgrade is imminent then please ignore me! It was just in case it was going to be a month or two down the line.

1 Like

Hi @John, Any updates about this feature?

Thank you!

1 Like

Sorry, yes - this actually ran into a few technical challenges and got put on pause at the end of last year. Will hopefully be able to circle back to it soon.

1 Like

No problem! Thank you for your reply =)

It seems like a year has passed, I am very interested in this issue. Will you continue to do this or have you removed it from the project? :disappointed_relieved:

1 Like

Hi, is this a feature you are still working on or thinking to work on soon?
This would be so great.

I guess this feature will be into reality soon. Just always check the changelogs weekly there.

Any update on the status of this feature?

Now that memberships is a thing, this is becoming more useful than ever!

1 Like

Reaching capacity of tags on our Ghost blog too, would be nice to see this feature soon! Any updates on when this might be shipped?

1 Like

To my understanding, the Ghost team is pretty hung up on taking the Members feature from beta to release and fixing numerous bugs. This will probably take some time, but I do agree, this feature would be a great addition!

Hi, I’m wondering if there’s any update on this feature status or a branch of code where the community can contribute. I’d like to help because I’m hoping to move a WP site to Ghost and not having the ability for nested/hierarchical tags is almost a non-starter. I’m in the planning stages and already my routes.yaml file is becoming unruly. Thanks!

5 Likes

Same for me, I would love to get a short update from the awesome Ghost stuff team, since I want to move from WP to Ghost :slight_smile:

2 Likes

Also in the process of migrating a site from Wordpress where hierarchical tags would replace alot of sloppy solutions, otherwise Ghost has been so refreshing to use. Looking forward to an update!

1 Like