Search code examples
coldfusioncoldbox

Names of all rendered views in ColdBox (coldfusion)


I have a handler with a whole bunch of views. I am seeking a lot for some small changes sometimes.

<cfreturn renderView("modules/account/dspCustomMenu")>

Does there exist a function so I can put a border around each view with a label where it's name stands? I have seen this before on Magento (php).

Anyone ideas?


Solution

  • ColdBox has the ability to overwrite / customise Request methods. Have a look at RequestContextDecorators in the docs:-

    http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbRequestContextDecoratorGuide

    I don't know if you can overwrite that particular method but if you can't then you should be able to create your own "renderViewWithLabel" method which wraps around renderView.


    A few things that might help are application helpers and udf injection. Again you can find them in the docs but they're ways of adding Customised methods into the request.

    Cheers, James