I've only just started looking at uSiteBuilder and was just wondering is there an automated way to rename the alias of a property? Or is there an event I can subscribe to before usitebuilder updates the database to update the alias myself?
It's only possible to change a name of a document type property automatically. It is not possible to change alias (which is automatically created by .NET class property name) automatically.
But it is possible to change alias manually:
1. Change alias name manually through Umbraco backend (e.g. myProperty -> myChangedProperty)
2. Change name of your .NET class property. (e.g. public string MyProperty -> public string MyChangedProperty). So now alias in Umbraco and alias in your code will match.
3. Do deployment. Now uSiteBuilder won't even know that alias has changed.
I guess it's not that much of an inconvenience to do it this way as hopefully alias name changes (if any) will only be happening in the initial build stage.
Rename Property Alias?
Hey,
I've only just started looking at uSiteBuilder and was just wondering is there an automated way to rename the alias of a property? Or is there an event I can subscribe to before usitebuilder updates the database to update the alias myself?
Thanks,
Pat
Hey Pat,
It's only possible to change a name of a document type property automatically. It is not possible to change alias (which is automatically created by .NET class property name) automatically.
But it is possible to change alias manually:
1. Change alias name manually through Umbraco backend (e.g. myProperty -> myChangedProperty)
2. Change name of your .NET class property. (e.g. public string MyProperty -> public string MyChangedProperty). So now alias in Umbraco and alias in your code will match.
3. Do deployment. Now uSiteBuilder won't even know that alias has changed.
Thanks for the response Vladan.
I guess it's not that much of an inconvenience to do it this way as hopefully alias name changes (if any) will only be happening in the initial build stage.
is working on a reply...