I am on a roll with using Cursor and now have a basic MySQL CRUD (Create,Read,Update,Delete) working in a Custom Component. I thought this now deserved its own thread.
At the moment to get this to work, I am having to do various updates into the Page settings apart from the code in the Custom Component. In the fullness of time, I would like to be able to encapsulated all this into one (or maybe two) Custom Components that are a just configured by the Custom Component properties.
Wow, this is awesome This is exactly what we wanted for custom components. It puts the power in the users hands and you guys can create solutions for yourselves (and others)!!!
Is there anything you need from us to make this work… Do you need to inject things into the head?
Yes, to be able to inject into the Page Setting Areas is what is ideally needed.
For example to be able to configure via a Custom Element’s property items such as a MySQL database name, user id and password. and for the associated PHP code, updated with the property values to be able to be injected into the Page Settings. In this Custom Component, I am injecting into the Page Start, Body Start and Body End. I ideally wanted to add a class to the tag - not sure if that is possible - so I topped and tailed a DIV in the Body Start / Body End to include the class.
A mechanism to show them in the Page Settings, but make these injections non-modifiable (except by the Custom Component) would be a bonus.
Finally to be able to package these to share the Custom Components as opposed to projects with them included would be good, I guess this will happend in due course?
There might be other things to add to this list, once I get a bit futher down the line.
I don’t think you want to inject them into the Page Settings area, how about you just do it directly
I think we have a large part of what you need covered with the next beta (v13). Take a look at the new portal feature and see if that would work for you!
Yes, this is 100% planned, and if you guys keep producing all these custom components, we’re going to need to do it sooner rather than later!
Ohhhh… some api to look at - good stuff. Ok so if multiple components are injecting php into the head (or anywhere else for that matter), will it keep the code blocks separate?, ie. not try to fit one piece of code inside of existing php tags - I’ve seen code mutation problems before and I don’t want to fight this anymore
Another thought - probably for css that’s unique to a component (not sure if would need for js yet), can we tell the api that all those code blocks from my components plus any other components should be combined into a single minimized css call in head?