I'm just getting started with ColdBox. I'm wantin...
# box-products
h
I'm just getting started with ColdBox. I'm wanting to rewrite a small legacy application that has a bunch of different forms to learn ColdBox. There are common sections shared amongst all the forms. For example, at the top of each form, it asks for common information such as first name, last name, phone number, etc. In the legacy version of the app, a cfinclude is used for this section of the form. Is there a recommended ColdBox approach to do this?
d
what up @hemi345 I only use Coldbox for restful applications, but since I render emails as well I know the basics of coldbox layouts and views. So check out this section for views: https://coldbox.ortusbooks.com/the-basics/layouts-and-views/views and this for layouts: https://coldbox.ortusbooks.com/the-basics/layouts-and-views/layouts
renderView() at a glance does what you would expect a cfinclude to do, but the power of this method is all the properties it comes with.
on this page, and underneath the diagram you will see a list of the properties you get with renderView(): https://coldbox.ortusbooks.com/the-basics/layouts-and-views#injecting-in-your-models
👍 1
b
I would start with renderView()
👍 1