I want to use News Editor to allow front end users to notify back end managers of forthcoming events by creating MODx Resources.
I’ve established a custom template that collects name, place, and details by using built-in fields like +pagetitle+ +title+ and +content+.
I also want to capture start and end dates, and store them in such a way that EasyEvents can find them. To do so I need to put the dates into the template variables defined in my EasyEvents template.
With me so far?
News Editor happily captures all the data - (I’ve suborned the Javascript that picks up the published/unpublished dates which I don’t require), but I don’t know how to populate the not-yet-created document’s TVs. If that is possible. Nor do I know how to, or when to, find a just-created document, or to be precise the document I have just created, and populate its TVs as a second-phase approach.
I’ve tried copying the "setTV" function from the CAKE API, but don’t seem to be able to pass the correct docid to the function - or I may be stuffing it up some other way - I’m no PHP programmer.
It occurred to me that this can not be a new idea, and I did my usual hunt through the fora, but I’ve drawn a blank. Is it something basic? Or is it too hard?
If someone has the time to drop me a hint, I’d be grateful.
MODX Revolution 2.6.5-pl (traditional)
Hosted on MODX Cloud
Skype: nicbaldeagle
You might be able to get the ID of the newly created document with
If not, you’ll have to query modx_site_content table in the DB for the document by name and check its ID.
Thanks Bob, I’ll give it a shot.
Nic
MODX Revolution 2.6.5-pl (traditional)
Hosted on MODX Cloud
Skype: nicbaldeagle