// example custom verb that compiles to a tag // usage: // 1. add the lexicon declaration to your circuit file: // // 2. use the verb in a fuseaction: // // // // how this works: // a. validate the attributes passed in (fb_.verbInfo.attributes) // b. in start mode, generate the required CFML // c. in end mode, do nothing (this tag does not nest) // if (fb_.verbInfo.executionMode is "start") { // // validate attributes: // var is required: if (not structKeyExists(fb_.verbInfo.attributes,"var")) { fb_throw("fusebox.badGrammar.requiredAttributeMissing", "Required attribute is missing", "The attribute 'var' is required, for a 'dump' verb in fuseaction #fb_.verbInfo.circuit#.#fb_.verbInfo.fuseaction#."); } // label is optional, create the text to generate - note the quoting technique: if (structKeyExists(fb_.verbInfo.attributes,"label")) { fb_.label = 'label="#fb_.verbInfo.attributes.label#"'; } else { fb_.label = ''; } // // start mode: fb_appendLine(''); } else { // // end mode - do nothing }