This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

matthewpawley
matthewpawley

I need to validate the URL parameters (https://octobercms.com/docs/cms/pages#url-syntax) from the CMS pages section.

For example if you have the following URL for the Product detail page set up:

/:category/:slug/

And also have the following news detail page:

/news/:slug/

The product detail route is matching "/news/example-page/".

Ideally I would like to be able to perform a database query then tell October Router that the URL does not match rather than having a make a 404 or redirect as this may have implications on SEO and extensibility.

During a slack conversation it was suggested something along the line of '/product/:slug|checkSlugIfExists+$' may be possible, although from what I understand October doesn't support custom twig filters in the URL match?

Any help would be greatly appreciated and apologies if this has already been asked.

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.