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

Add method to LP model to overwrite generated slugs if set #705

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

web-dev-trev
Copy link
Member

So in our twill updates the HandleSlugs trait added auto generation from title as the default behavior. This breaks any custom slugs we set like 'Articles & Videos' because it then gets set to '/article-videos'. Without this method set in the model it'll always default to it. This is a fix just for LP's but we could also set this as default behavior in the HandleSlugs trait.

Copy link
Member

@zachgarwood zachgarwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by this. Where will this be called? And if the issue is the HandleSlugs trait, shouldn't we override the beforeSaveHandleSlugs() method in the LandingPageRepository?

@nikhiltri
Copy link
Member

@web-dev-trev Can you provide clarity on this PR? I’m not seeing a reference to shouldGenerateSlugOnSave anywhere in our code or Twill’s code, so I'm not sure where this value get plugged into.

@web-dev-trev
Copy link
Member Author

@nikhiltri @zachgarwood I'm not sure where this gets resolved at, I imagine there's a pattern similar to how scope attributes work that twill is looking at for this shouldGenerate. In any case I can close this and resolve it in the module repository rather than on the model.

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

Successfully merging this pull request may close these issues.

3 participants