Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Suggestion: removable "slug" in fixedPostVars for extensions #587

Open
ursbraem opened this issue Dec 22, 2017 · 4 comments
Open

Comments

@ursbraem
Copy link

ursbraem commented Dec 22, 2017

I'm investigating about "stackoverflow-style" URLs for a while.
Now it ocurred to me that maybe this could be a sponsorable feature for RealUrl?

The basic idea is quite simple: instead of the human readable part being used to look up the record, a record's uid is provided in the URL. The human readable part (slug) is just an addition (for readability). It can be changed or left away. For the lookup, only the uid is being used. If the slug doesn't correspond to the real slug, a redirect occurs.

Here's an example for this behaviour

Basic info:
https://stackoverflow.com/questions/39573477

Full current post URL
https://stackoverflow.com/questions/39573477/extbase-not-found-exception-redirect-to-404-default-page

Old title, mistypes ect
https://stackoverflow.com/questions/39573477/whatever

The config could be something like this: infixedPostVars

                    'lookUpTable' => array(
                        'table' => 'tx_myextension_domain_model_item',
                        'id_field' => 'uid',
                        'alias_field' => 'uid',
                        'additional_slug' => 'title', # <- that's imaginary

What do you think?

PS: Mathias Brodala is developing an extension that extends realURL for regular pages on https://github.com/pagemachine/typo3-flat-urls . I'm more concerned about "flat URLs" for extbase extensions than for pages, though.

@dmitryd
Copy link
Owner

dmitryd commented Jan 8, 2018

@ursbraem
Copy link
Author

ursbraem commented Jan 9, 2018

Can it be that you are referring to this other issue #177 ?

Because https://stackoverflow.com/questions/39573477/extbase-not-found-exception-redirect-to-404-default-page seems to be about that story (that if you don't handle the 404 in your extension, extbase will just throw an error).

@dmitryd
Copy link
Owner

dmitryd commented Jan 11, 2018

No. You can use one GET value just one in postVars. So what you want to do is not doable out of the box. But With what I offered, it is possible.

@ursbraem
Copy link
Author

ursbraem commented Jan 15, 2018

I don't understand, sorry

Let me just propose one simplification to the concept, which removes the redirect.

Post Uid=123

URL used in Links on Site
www.example.com/path/to/posts/123/the-current-title-of-the-post

Working URLs
www.example.com/path/to/posts/123/the-current-title-of-the-post
www.example.com/path/to/posts/123
www.example.com/path/to/posts/123/an-old-title-of-the-post
www.example.com/path/to/posts/123/any-mispeled-tile-of-the-pst

That would be sufficient for what I imagine. No redirect to the current full URL is necessary. The "slug" implies no GET value, it's just an additional information appended to the functional part of the URL.

Is that maybe feasible already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants