Creating a custom CP module #8562
Unanswered
ehbfa
asked this question in
Troubleshooting
Replies: 1 comment 2 replies
-
What do you mean "fails to run"? Should all still work, V4 didn't change that many things. You make CP modules the same way as before, in Vue 2 (usually), then compile them into a js file that's loaded by Statamic. Take a look at Runway, for example, it has custom CP pages. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Heya! I want to write a custom module to handle incoming registrations (form submissions). Because I need to do all kinds of extra stuff with that data, like grouping it based on the event (even though there is only one form), and add extra features like 'download PDF'.
Now I have done this in the past for an older project, but this time, when I use that code - it fails to run. So I'm trying to go back to the basics, and see why/how I should set this up in newer statamic projects. The old project was on Statamic/cms 3, as is the new one, but the old project was using webpack and the new one is using vite. And when I try to compile the code, it fails on the Vue templates. But I cannot figure out how to solve that.
So my question is; what is a good approach to create a custom CP module, with a table and detail view?
A bit more off topic (as that is probably more a vite question), is why does my compilation fail with an error pointing to my template code which runs fine in webpack. I can of course provide the error, if this isn't too much off topic :)
Beta Was this translation helpful? Give feedback.
All reactions