Hi All.
I’ve looked high and low for tips or solutions to this issue and haven’t found anything very useful. I’d love some pointers or even better, some sample code I could use to get me started.
I am developing a national website for my church denomination. The idea is that a representative from each church can log in and change their details - i.e. a map to their church, the address, a description, some contact details, and a listing of regular events such as church services, youth group etc that happen there.
I’ve got a template for this church details page, and have most of the individual bits of information defined as TVs, which is working great.
Where I am stuck is with the church events - what I want to do is let the churches add in as many events as they like, up to a limit of maybe 10. Some churches will have only 1 or 2, others will have more. I’ve defined a custom TV for my event that just consists of two text fields - event name and event description. Any ideas on how I manage multiples of these? So far I’ve just created 10 of them but having this many blank fields will be confusing and clunky for users wanting to manage their church details. I’d like to just show initially one blank event that they can fill out then then click on ’Add Another’ or something to add more. Where/how do I go about doing this?
Any help is appreciated. I also hope I’ve posted this in the right place.
Thanks!
Thanks for the ideas. I am using Revolution, so there aren’t any calendar add-ons or I’d have already tried them. I’ll look into Ditto though - is there a Revo version? I thought it was mainly for blogs so hadn’t looked at it until now.
-
☆ A M B ☆
- 24,524 Posts
Revo doesn’t use Ditto, it uses getResources instead.
OK, I’m still stuck. I’ve tried looking into getResources and CRUD modules and custom DB tables and writing plugins to edit the Manager screens, but I am just too much of a newbie to know which is the best option or even which is possible, or how to combine them or how to go about any of them once I choose.
I am familiar with PHP (not so much JSON but I do know Java which is OO) and database tables etc, so I think I could figure out how to do it if I was just confident that I was going with the right approach, but trying to figure out which is the right/best way to do it is doing my head in.
Can anyone please give me some more concrete advice about which approach to take and how to get started please? Surely someone has done something like this before?
Thanks.
I think the easiest way for you with less coding is to use subresources for each event under each church-resource.
Better, because you have all in one place, but more coding is to create a custom-tv-input-type and a listing-snippet as said in the other thread.
If you want them to edit there datas at frontend with something like Xedit it can be the easiest way for editors, but its even more coding for you.
That said, I would go the middle-way and try it with custom-tv-input-type. If you have questions how to do it, I’m sure the great modx-community will help you, so you will have a working solution finally.
Thanks Bruno! I don’t need to use Xedit for front end editing, so that’s one less hurdle. =)
And I think I’ve created a custom tv input type as well, or have it mostly working, so thanks for reaffirming that it would be the best way to go.
Can you give me a few extra pointers on how to about creating a ’listing snippet’ so that my church users can add multiples of my custom tv input type? How do I plug it in to the Template Variable editing screen, for starters?
Thanks again.
for a startpoint you can upload the imagelist-TV:
http://modxcms.com/forums/index.php/topic,52539.0.html and see how it works and how its done. There is also included a listing-snippet.
Its not so difficult to modify the input-fields for your needs. Instaed of image-input-field and description field there could be other field-types.
you have to modify the extJS and php-parts.
AWESOME! How I wish I’d seen this earlier, it’s exactly what I’m after thank you SOO much! Not sure how I missed it, must have had too many options swimming around in my head and somehow skipped this when it is perfect and just what I wanted. Thanks again!
I’m glad I could help you to get a starting-point with my code-example