Make category part of page url, like http://domain/category/page

Post Reply
User avatar
padawan
Ssr. Bludit
Posts: 10
Joined: Sun Nov 10, 2019 4:26 pm

Mon Nov 11, 2019 1:55 pm

Currently in my bludit installation (which is pretty much default) the url of the category is not part of a pages' url. Is there a way to change this, so that for a page that belongs to a category, the category name appears as a slug in the pages url? So that for example when the page "scrum-master" belongs to the category "skills", it´s url would be http://mydomain.com/skills/scrum-master"?

Regards,
padawan
User avatar
Edi
Site Admin
Posts: 1660
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Mon Nov 11, 2019 5:45 pm

No, Bludit has no such permalinks.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
padawan
Ssr. Bludit
Posts: 10
Joined: Sun Nov 10, 2019 4:26 pm

Mon Nov 11, 2019 8:34 pm

Okay, thanks for your quick answer again. Still a great CMS. I managed to build my own template from an HTML design I made before, even with some individual features I would consider "not beginners level", in just a few hours, with ease. Really fun to work with Bludit.
User avatar
Edi
Site Admin
Posts: 1660
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Mon Nov 11, 2019 8:43 pm

Thank you! Kudos to Diego.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
padawan
Ssr. Bludit
Posts: 10
Joined: Sun Nov 10, 2019 4:26 pm

Mon Nov 11, 2019 9:04 pm

Absolutely :)

As for the url slug, I just had the idea for a workaround. I could create a parent page for all pages of the category "skills", then declare all pages in that category child pages of it, and give the parent page a slug name similar to the one of the category... maybe like "category-skills". Then all child pages of the parent page "skills" would habe an url like e.g. http://mydomain/category-skills/scrum-master.

I tried it - it works, technically. Is there anything that speaks against doing so, from your point of view?
Last edited by padawan on Mon Nov 11, 2019 9:45 pm, edited 1 time in total.
User avatar
Edi
Site Admin
Posts: 1660
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Mon Nov 11, 2019 9:08 pm

I thought also that this could have been made like this. But I do not know if this would affect SEO.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
padawan
Ssr. Bludit
Posts: 10
Joined: Sun Nov 10, 2019 4:26 pm

Mon Nov 11, 2019 9:55 pm

I could even check in the index.php of my theme if the parent page is being delivered, and if so, call the home.php template instead of the page.php template, that way having the parent page render a blog view of all pages in that category... and then, with simple str_replace(), rewrite the link hrefs of the listed category entries so that they contain the new url slug. Hm... I have to take some time to think about it 8-)

[EDIT]
I dropped the idea. It would in a way void the great advantage of Bludit and also of my theme that all parts of the code one really has to deal with when bulding a website are kept pretty simple. Maybe "url category slug as part of page url" finds it way on the list of features for future versions :)
[/EDIT]
Post Reply