RE: [coldbox:3656] Arguments for RunEvent or Viewlet

Interesting suggestion. Like Seth, I hadn't really considered
generating HTML from the model or a plugin since it just didn't "feel"
right. I don't want to hi-jack Seth's thread at all, but I would like to
hear an elaboration on what you consider "standardized HTML". Do you
just mean that the HTML is the same every place it is included (with the
exception of a variable width or something).




Yup. If the HTML is exactly the same every place that it’s included (except for parts that have been abstracted into arguments like the width), then I can stop thinking it about it as HTML and look at it as a custom format with defined rules to its structure, just like XML or JSON, that just so happens to render as HTML.

So from my model or plugin’s perspective, it’s simply returning a structure using the arguments you provide. It then falls to the controller and view to coordinate in making the returned structure (the “standerized” html) look as it should.

  • Gabriel