Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pat O'Callaghan 34 posts 56 karma points
    Aug 31, 2011 @ 01:29
    Pat O'Callaghan
    1

    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

  • Vladan Ostojic 94 posts 210 karma points
    Aug 31, 2011 @ 09:20
    Vladan Ostojic
    0

    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.

     

  • Pat O'Callaghan 34 posts 56 karma points
    Aug 31, 2011 @ 13:10
    Pat O'Callaghan
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft