Blog-plugin: [Feature Request] Nested categories/sub-categories, support hierarchical URLs

Created on 7 Oct 2014  路  20Comments  路  Source: rainlab/blog-plugin

The Blog Plugin (http://octobercms.com/plugin/rainlab-blog) is quite good, but I have a huge pain point that is stopping me from using it (and therefore, OctoberCMS). I really need nested categories (categories and subcategories) in the blog, both for "clean" URLs for the end-user, and for SEO. I imagine a lot of other people would want this feature as well...I would really appreciate you making this a priority, given how much momentum octoberCMS is starting to pick up now.

See screenshots from wordpress here: https://wordpress.org/plugins/hierarchical-link-categories/screenshots/

Details:

This page: /october/backend/rainlab/blog/categories currently shows a flat list of categories. It would be very useful to have this list be hierarchical (so, you can add sub-categories to the tree). Optional / Nice to have: You can drag/drop categories and subcategories anywhere in the tree.

The front-end would show nested URLs like: /getting-pregnant/trying-to-conceive/article1.htm /getting-pregnant/trying-to-conceive/article2.htm In general: /{category1}/{sub-category2}/{sub-sub-category3}/article1.htm
Optional / Advanced feature: The Back end could allow the admin to select URLs that are either flat, or nested. If 'flat' is selected for the URL structure, the front-end for the 3 examples above would have URLs like: /trying-to-conceive/article1.htm /trying-to-conceive/article2.htm In general: /{sub-sub-category3}/article1.htm

The schema and sample data for categories would look something like this:

CREATE TABLE categories ( id int(10) unsigned NOT NULL AUTO_INCREMENT, id_parent int(10) unsigned DEFAULT NULL, name varchar(63) COLLATE utf8_unicode_ci NOT NULL, url varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, is_featured tinyint(1) NOT NULL DEFAULT '0', is_active tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=132 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Sample Data for the table categories */
insert into categories(id,id_parent,name,url,is_featured,is_active) values (1,0,'Considering a Baby','/considering-a-baby',0,1); insert into categories(id,id_parent,name,url,is_featured,is_active) values (2,0,'Getting Pregnant','/getting-pregnant',0,1); insert into categories(id,id_parent,name,url,is_featured,is_active) values (3,0,'Pregnancy','/pregnancy',0,1); insert into categories(id,id_parent,name,url,is_featured,is_active) values (4,1,'Are We Ready?','/considering-a-baby/are-we-ready',0,1); insert into categories(id,id_parent,name,url,is_featured,is_active) values (5,2,'Trying To Conceive','/getting-pregnant/trying-to-conceive',0,1);

Low Review Needed Conceptual Enhancement

All 20 comments

Any update on this? We really need this functionality. I can wireframe the UI of what this would look like in the back-end (category selection, etc) if you think that would help.

+1

Any news?

+1

Is it already possible to nesting correctly and in an easy way?

Extending Rainlab Blog with custom plugin can do the trick.

Or try to post a bounty. It looks like authors don't have a time to implement this.

@jan-vince I don't have that kind of knowledge to build a custom plugin. Do you? And do you have some time?

I will try to add this into my Small Extensions plugin when I have some time.

But my TODO list is quite long right now :(

The support demand for October is increasing, while the available time the founders have to give remains the same. These issues will be handled in time, however there are ways you can help:

  • Submit a pull request that introduces this feature and wait for it to be reviewed
  • Post a bug bounty for this specific issue so that more people can become involved with creating a fix
  • Make a financial contribution to the project so we can allocate more time towards making improvements like these that benefit everyone

Bounty posted 馃槃

@roojai link?

I have never noticed it, but Blog plugin already supports nested categories.

When you make two categories and hit a Reorder button, you can move a category beneath another one.

snimek obrazovky 2017-09-14 v 17 13 25

So now only to solve a hierarchical URLs...

I'll check that out Jan! Thanks.

For this to be truly useful it has to be possible to display the sub categories on the frontend (without the parents), and also create filters that filter by the sub categories too.

Bounty link is here: https://www.bountysource.com/issues/5130437-featurerequest-nested-categories-sub-categories-support-hierarchal-urls

@roojai do you still need anything done?

@LukeTowers I built my own plugin with the category requirements I needed, so I did not use the blog plugin in the end.

I am not sure if the apparently already built nested category functionality meets the criteria for the bounty I posted, or who should receive it if it does.

I am happy to move the bounty to something more pressing, but not sure if there is an option for that

@roojai in an effort to steal people's money, BountySource has just announced that they're going to be keeping any bounties older than two years unless the bounty poster emails them at [email protected] to redirect the bounty to another issue.

See below that was just emailed out today:

2.13 Bounty Time-Out.
If no Solution is accepted within two years after a Bounty is posted, then the Bounty will be withdrawn and the amount posted for the Bounty will be retained by Bountysource. For Bounties posted before June 30, 2018, the Backer may redeploy their Bounty to a new Issue by contacting [email protected] before July 1, 2020. If the Backer does not redeploy their Bounty by the deadline, the Bounty will be withdrawn and the amount posted for the Bounty will be retained by Bountysource.

If you would be willing to email [email protected] to redirect your bounty to the Laravel 6 upgrade instead, that would be greatly appreciated: https://www.bountysource.com/issues/75392602-move-to-laravel-6

Just in case you don't see this in time, I will be closing this issue and making a claim on the bounty, feel free to reject the claim if you would like to redirect it to the L6 upgrade instead.

@LukeTowers I would prefer to redirect to Laravel 6 upgrade. Will see if I can do that.

@LukeTowers that whole BountySource website seems to be slow and buggy. I hope you got the claim ok. You deserve it, thanks for all your work on October!

@roojai I haven't submitted the claim yet, their site is indeed very slow and buggy. Were you able to get in touch with them via the support email?

@LukeTowers I have just sent them an email, will let you know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

petehalverson picture petehalverson  路  3Comments

AugmentBLU picture AugmentBLU  路  3Comments

silasrm picture silasrm  路  4Comments

MaTToX3 picture MaTToX3  路  6Comments

nycparking picture nycparking  路  7Comments