Uploaded image for project: 'ColdBox Platform'
  1. COLDBOX-730

Implicitly pass args from renderLayout() into the rendered views

    Details

    • Type: Improvement
    • Status: Resolved (View workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.1.4
    • Fix Version/s: 5.2.0
    • Component/s: Renderer
    • Labels:

      Description

      I encountered a problem when using the coldbox.system.web.Renderer to render a layout.

      renderer.renderLayout(
        view = '_templates/email/forward_trade_notification',
        layout = 'email',
        args = { data : 'abc123' }
      )
      

      The expected behaviour (for me at least) was for the arguments to be passed into the rendered view. At the moment you have to explicity pass the arguments into the view using #renderView(args=args)#.

      Alternatively, another suggestion was have a viewArgs parameter in the renderLayout method which would explicitly pass the args into the view.

      Regards
      Ryan

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lmajano Luis Majano
                Reporter:
                ryanalbrecht Ryan Albrecht
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: