RE: [coldbox:17577] best practice

Honestly, I don’t know if there is a “best practice” per se, but any one of the following should work:

  • onRequestStart event
  • preProcess interceptor
  • RequestContextDecorator that sets defaults into the rc when created
  • You could even override it at a handler level by using the preEvent() convention methods there
  • Changing every place you get the value to event.getValue(‘title’,‘Main Website Name’)

You can store the default value as a setting, but there is not setting that I know of for automatically defaulting rc values.

Perhaps someone could submit a simple interceptor to ForgeBox which accepts a struct of values to default as its properties and places them into the rc. :slight_smile:

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com