I have a business requirement to alter the generated NodeAliasPath in the following way:
A: Increase the NodeAliasPath to use an 80 character home made version based on the title (ie Ignore the nodeAlias column)
I have managed to get to the point that once the user clicks 'update' the nodeAliasPath reflects the correct way. However on intiial item create/insert the default value is being created.
Something/Somewhere in the save method the value I am sending to the nodeAliasPath is getting overwritten by the system.
I have tried
DocumentEvents.Insert.After += Document_Insert_After;
DocumentEvents.Update.After += Document_Update_After;
DocumentEvents.Insert.Before += Insert_Before;
private void Document_Update_After(object sender, DocumentEventArgs e)
{
TreeNode node = e.Node;
CreateCustomAliaspath(node);
node.update();
}
On inital save/item creation, I can see the documentAlias go from the correct one the system generated one.
So.. nutshell. When I create a new contentItem the saved value is using a system generated value. When I resave or edit the document the home made value is present.
Where do I ensure that on save my custom value is inserted into the database vs the system one.
Mac