Archetype multi row property editor on the front-end
Hi guys,
I have been playing with the idea of using Archetype to come up with a custom "CV" properties for site members.
If I am not mistaken I can create a new "CV" property in Archetype by just combining a few text string fields; one for the date, one for a brief description.
Next, I could add as many entries as I wanted to the "CV" property.
However, I also want to give members the opportunity to edit their CV from a dedicated page on the front-end, to not have to give them access to the back end.
I can do that easily for simple properties of my members.
However, I am a bit stuck as to how I should deel with a customised Archetype property: it is not enough to just get the stored data, somehow parse it and show sub items in a suitable editor. Users would also need to be able to add rows to the CV.
How would I go about that? Should I use some custom angular for that? Are there any known examples of something like this anywhere?
I did some more thinking, also looking at the very interesting Imulus TableEditor.
So, taking Imulus TE as an example (should be similar to Archetype, but simpler:
I could put a property on my members of type "Imulus TE".
I can make a suitable standard MVC Model that represents all member properties (Name, Email, CV) much like I already did once here (Thanks to the excellent ground work of Warren B). This time also including a "CV" property.
I can generate a suitable Surfacecontroller that has an action to load my member data and display it and an action to handle the update as I also already mostly have here.
Specifically for for my CV property, I can probably always cast the "CV" property of my member model to the TableEditor model. I could next traverse that model in my action to display text boxes holding the table data.
That leaves me with the main problem:
How do I generate a "dynamic" control that would allow me to keep on adding rows to the tabular data?
I m specifically stuck there because, provide that I have that part of the equation, it is easy enough to serialize the amended table data and put it back into my member model.
Doing server side stuff I' m familiar with, I lack experience doing client side things...
Archetype multi row property editor on the front-end
Hi guys,
I have been playing with the idea of using Archetype to come up with a custom "CV" properties for site members.
If I am not mistaken I can create a new "CV" property in Archetype by just combining a few text string fields; one for the date, one for a brief description.
Next, I could add as many entries as I wanted to the "CV" property.
However, I also want to give members the opportunity to edit their CV from a dedicated page on the front-end, to not have to give them access to the back end.
I can do that easily for simple properties of my members.
However, I am a bit stuck as to how I should deel with a customised Archetype property: it is not enough to just get the stored data, somehow parse it and show sub items in a suitable editor. Users would also need to be able to add rows to the CV.
How would I go about that? Should I use some custom angular for that? Are there any known examples of something like this anywhere?
Cheers,
Kris
I guess that question could be expanded to "how to create a front end editor for any property created using Archetype"
I did some more thinking, also looking at the very interesting Imulus TableEditor.
So, taking Imulus TE as an example (should be similar to Archetype, but simpler:
Specifically for for my CV property, I can probably always cast the "CV" property of my member model to the TableEditor model. I could next traverse that model in my action to display text boxes holding the table data.
That leaves me with the main problem:
How do I generate a "dynamic" control that would allow me to keep on adding rows to the tabular data?
I m specifically stuck there because, provide that I have that part of the equation, it is easy enough to serialize the amended table data and put it back into my member model.
Doing server side stuff I' m familiar with, I lack experience doing client side things...
is working on a reply...