best way to add more data fields?
Permalink Browser Info Environment
Hello
I purchased your testimonials addon because I like the general way it works for managing testimonials and adding them to pages.
I want to add my own data fields though (not just add them to the "Extra" area) for things like:
- headline (text)
- location (text)
- date (date picker)
- photo (file picker)
This is because I want finer control in how this it output in the code. (I'd also like to change the actual content area to a Rich Text Editor, but that is not too important right now.)
Anyway, I am just wondering if I have to edit the main package OR if I can modify the package the way I would normally extend something in the concrete core?
(PS. I am getting a friend to program this for me [not programming myself], and he is asked whether he should edit the main package. My feeling is "no, you should extend it if possible" but I don't know enough about extending C5 addons to advise him)
Thanks in advance!
I purchased your testimonials addon because I like the general way it works for managing testimonials and adding them to pages.
I want to add my own data fields though (not just add them to the "Extra" area) for things like:
- headline (text)
- location (text)
- date (date picker)
- photo (file picker)
This is because I want finer control in how this it output in the code. (I'd also like to change the actual content area to a Rich Text Editor, but that is not too important right now.)
Anyway, I am just wondering if I have to edit the main package OR if I can modify the package the way I would normally extend something in the concrete core?
(PS. I am getting a friend to program this for me [not programming myself], and he is asked whether he should edit the main package. My feeling is "no, you should extend it if possible" but I don't know enough about extending C5 addons to advise him)
Thanks in advance!
Type: | Discussion |
---|---|
Status: | New |
You can edit the package, but you just have to be make sure that you don't update it if a new version comes out because it would overwrite your changes.
Other than that adding fields should be pretty straightforward, you have to add the database fields to db.xml, and then you will need to add the fields to the form in the dashboard. You will also need to make sure that the fields get saved in the Testimonial model. Then all you need to do is add the fields in the blocks view.php
Hope this helps!