Hi all,
I have only just started to play around with ModX and I am really impressed so far. The only question I have really is how to add custom variables (e.g. DATETIME variables) that can be searched via SQL queries? For instance, I am building a literature festival website and individual pages need to be assigned a date as they refer to specific events e.g. a book signing on 5th December or a reading on 8th December etc.
The site then needs a dropdown on all pages that allows the user to select a date, and then be taken to a page (a landing page) that lists all events taking part on that day. These events then click through to the events page. I know that this could be done manually, but I would really like to have these pages update themselves as there are lots of events going on. To explain:
Folder structure:
EVENT CATEGORY 1 (e.g. Crime writing)
EVENT NAME 1 (e.g. Crime book 1 reading) - this is on May 19th
EVENT NAME 2 (e.g. Crime book 2 book signing) - this is on May 20th
EVENT CATEGORY 2 (e.g. Autobiographical)
EVENT NAME 3 (e.g. Autobiography 1 reading) - this is on May 19th
EVENT NAME 4 (e.g. Autobiography 2 book signing) - this is on May 19th
EVENT NAME 5 (e.g. Autobiography 3 reading) - this is on May 20th
I need the above to be grouped by category, but also using a jumpmenu I need to select by dates. Is this possible?
Thanks!!!
-
☆ A M B ☆
- 24,524 Posts
I believe that Ditto with filters can do this, although I haven’t done anything this complex with it yet myself.
I used ditto as an event calender and use the unpub_date to sort the documents, so create a document and set it to unpub at the date the event hapens. works great for me. an you could use ditto templating to create a dropdown list.
I am planning to write a little tutorial how to set up a events calendar with ditto soon.
Dimmy
Thanks for the information guys.
I have been looking into Ditto and will definitely see if I can get this to do what I want.
I like the look of your solution Dimmy, but there is one major setback. I need all my documents to remain published as the site will need to be able to be archived. As it is a literature festival that happens every year, I need people to be able to look back at each year’s festival. For each year I am going to use a different template and category to archive by, but obviously this is why the documents need to remain published.
I think I may be able to get Ditto to search by custom TVs, so I can then set a set a date TV for each page?!? I’ll let you know. This’ll be a great function if I can get it to work as lot’s of my clients ask for a similar tool...
you could indeed use a TV with a date and sort using that tv that way you can keep the older dates published.
but my problem was that the events calender would alway’s show the published "older" events still on top.
I see what you mean Dimmy with the events calendar. I’ll be interested in seeing your tutorial!