backdrop-contrib / forum_ng

GNU General Public License v2.0
2 stars 1 forks source link

Default URL pattern #5

Closed laryn closed 3 years ago

laryn commented 3 years ago

The default pattern for threads is thread/[node:title]

I think it makes sense to keep the forum structure in the URL. If the PR in #3 gets in, something like this would work: forums/[node:forum_ng_taxonomy]/[node:title]

This way the structure is clearer and the breadcrumbs work.

olafgrabienski commented 3 years ago

something like this would work: forums/[node:forum_ng_taxonomy]/[node:title]

Would the singular form forumwork also, or are there other places already defining the plural form, so that plural makes more sense?

laryn commented 3 years ago

Depending on @docwilmot's preferences in #3 we can follow the decision. I think in the PR I made I used plural (the admin page has a link to "Add forum" which seems to indicate there will more than one) but I'm not wedded to it.

laryn commented 3 years ago

The suggestion I gave works for single-tier forums but doesn't account for parent/child forums in the path structure. The core breadcrumb seems to work.

docwilmot commented 3 years ago

The suggestion I gave works for single-tier forums but doesn't account for parent/child forums in the path structure.

Custom URLs are doable but we cannot use the pathauto UI and have tokens. We'd have to agree the URL pattern now, and hard code and save the URLs using hook_entity_insert()

docwilmot commented 3 years ago

Unless we create a custom token that generates the path. 🤔

laryn commented 3 years ago

Interesting idea!

docwilmot commented 3 years ago

I actually did this last night, forgot to PR. At work now, post later.

docwilmot commented 3 years ago

I pushed a PR but i based it on another pr so its got too many commits

laryn commented 3 years ago

Tested and works great. RTBC.