Changing object label defaults

By default, FarCry has an automagic function that determines an object’s label based on properties that contain keywords like title, and name. If it can’t find anything you end up with a UUID (not too pretty).

But if you want to change the label in a less haphazard way what would you do?

  • use blabel="true" attribute on the component property of choice
  • add an afterSave() function to set the label
  • override the autoSetLabel() function in types.cfc

While all of these options work, the simplest way to nominate a specific label is to create a displayLabel.cfm webskin for your content type, as that’s where all the current magic happens :wink:

What do you do?

I override autosetlabel(). Logic should happen in functions not view templates. IMO.

Same. autoSetLabel(). In very rare instances I’ve used bLabel (for very simple types with one or two fields and no need for complexity).

I use bLabel for single string fields, otherwise autoSetLabel() :slight_smile: