Passing arguments to quickLayout

Hello

i need to pass an argument from pages.cfm to _header.cfm via quickView:

My pages.cfm looks like this

<cfparam name="args.myArgument" default="false"> .. ... .... #cb.quickView("_header")#

I asume, that it is very simple, but i wasn’t able to do it ;-(

Cheers

Martin

Hi Martin,

The CBHelper.cfc is located in Modules->ContentBox->plugins. In there you will find

/**

  • QuickView is a proxy to ColdBox’s renderview method with the addition of prefixing the location of the view according to the
  • layout theme you are using. All the arguments are the same as renderView()'s methods
    */
    function quickView(required view,cache=false,cacheTimeout,cacheLastAccessTimeout,cacheSuffix,module=“contentbox”,args,collection,collectionAs,prepostExempt){
    arguments.view = “#layoutName()#/views/#arguments.view#”;
    return renderView(argumentCollection=arguments);
    }

As you can see you can define a struct and pass it in as args, that is what you will be needing to use. Or do I not understand your question?

You can also use the API docs that ship to ContentBox. In the root of the ContentBox download is a file called ContentBox-API-1.5.7.zip.
Unzip that and open index.html. Choose contentbox.plugins from the package list, and click “CBHelper” under classes. Then click on the “quickView” method and you will have the full API docs for that method.

The API docs used to be online. The CFBuilder extension still opens the broken URL http://www.gocontentbox.org/builds/docs/1.1.X/. Perhaps Luis can shed some light on that.

However, the best way to know what inputs exist is to use CFBuilder with the ContentBox extension and use the option to install variable mappings. That will give you insight into the cb objection, what methods it has, and what args they take.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Hello

I think, i was a bit to tired at this time. I’m more or less familiary with the API. Tomorrow morning i figured out, how it works :wink:

Thanks anyway

Cheers

Martin

Hello,

By the way:

Cheers

Martin

Martin, how old is your download? I just tried again and can confirm that there is a file in the root of the zip called ContentBox-API-1.5.7.zip

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Hi Brad,

I downloaded CB (ContentBox-master.zip) from Github last friday and right now. This is very spooky: I can not see the zip file in the root or in a other folder.

Cheers

Downloading from github is just source not a full build.

We have automated build scripts that build a distribution package.

Good to know, many thanks

Cheers

Martin