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

Automatically set the slug for homepages #137

Open
mikedingjan opened this issue Sep 28, 2018 · 2 comments
Open

Automatically set the slug for homepages #137

mikedingjan opened this issue Sep 28, 2018 · 2 comments

Comments

@mikedingjan
Copy link
Member

At the moment we kinda assume the user will use the language code as a slug when creating an homepage https://github.com/LUKKIEN/wagtailtrans/blob/master/src/wagtailtrans/models.py#L273. It would be nice to have an setting which will enforce the homepage to be the language code, since this will be 99% of the time the case since this also sets the language from the request path properly.

I think it should nice when the direct children of the the TranslatableSiteRootPage get this slug automatically, so copied pages will have the right slug as well and not homepage-languagecode, this should be easy to check in a save() method on the model.

@jompu
Copy link

jompu commented Apr 23, 2019

Further more, it was not very intuitive to understand that you have to set slug as language code for this to work. Also I was confused by i18n_patterns until I found #67 and removed it.

@mikedingjan
Copy link
Member Author

I get that, only this is one of the possible strategies you can use.. We've implemented this without i18n_patterns to keep it flexible, all pages, know their language object, which will get activated in the serve() method.

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

No branches or pull requests

2 participants