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

Craft v4 support #2

Open
anchovy opened this issue May 17, 2022 · 2 comments
Open

Craft v4 support #2

anchovy opened this issue May 17, 2022 · 2 comments

Comments

@anchovy
Copy link

anchovy commented May 17, 2022

Hi, Is this plugin going to be upgraded to support Craft V4? Any timeline for this?
Thanks in advance.

@zeitgeist-ch
Copy link

I seriously doubt — 4 years since last commit, the repo seems abandoned. Check the source code, it's really trivial to add the functionality to your own module (or add a new module). It's not complicated, all you need is in docs: https://craftcms.com/docs/4.x/extend/module-guide.html#preparation. In fact you need:

  • https://github.com/cocur/slugify (installed via composer)
  • in YourModule.php
        if (Craft::$app->request->getIsSiteRequest()) {
            $extension = new SlugifyExtension(Slugify::create());
            Craft::$app->view->registerTwigExtension($extension);
        }
    

The rest is a module scaffolding, see docs.

There used to be a tool for generating plugins/modules (https://pluginfactory.io/), but it does not support C4. Still, you may use it as a reference.

@anchovy
Copy link
Author

anchovy commented Aug 9, 2022

Thanks @zeitgeist-ch - think we'll do as you suggest.

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