I have an event document type under which I add time span document type nodes. Like this
Events overview
Event x
2020-06-23 to 2020-06-25
2020-07-08 to 2020-07-10
This example shows an event that happens twice.
On the time span document type I have two properties, startTime and endTime. When editors create these nodes it is a pain that the must find a proper node name for them since the most meaningful name is "
Can this be made programatically so the node name is filled out when the properties are set (that means before save og publish)?
Not exactly... What you could do is set a random default when the node is first created and sent to the browser, then during the save event change the name based on the input data.
Automatic node name from properties when creating
Hi forum,
I have an event document type under which I add time span document type nodes. Like this
This example shows an event that happens twice.
On the time span document type I have two properties, startTime and endTime. When editors create these nodes it is a pain that the must find a proper node name for them since the most meaningful name is "
Can this be made programatically so the node name is filled out when the properties are set (that means before save og publish)?
Hey Martin,
Not exactly... What you could do is set a random default when the node is first created and sent to the browser, then during the save event change the name based on the input data.
To set the default name you could use this approach https://justnik.me/blog/how-to-add-default-values-to-properties-in-the-backoffice-for-umbraco-v8,
Then hook into the saving event to set the real name, in order to bypass the validation checks.
Nik
is working on a reply...