Not yet rated

Problem

You want to use ColdFusion 9 to create Accordion Navigation using CFLayout Tag.

Solution

ColdFusion 9 added the Accordion navigation feature in the CFLayout tag. All the AJAX controls in ColdFusion leverages the EXTJS 3.0 library for to create Rich UI controls in ColdFusion. You can use the following code to create accordion navigation in ColdFusion.

Detailed explanation

<cflayout name="myAccordionLayout" type="accordion"
width="600px">
 
<cflayoutarea title="CF9 Tutorials" align="left">
  <h3>CF9 Tutorials</h3>
  <p>ColdFusion 9 Tutorials.</p>
</cflayoutarea>

<cflayoutarea title="CF Builder Tutorials">
  <h3>CF Builder Tutorials</h3>
  <p>CF Builder Tutorials</p>
</cflayoutarea>
               
<cflayoutarea title="CFSAAS Tutorials" align="left">
   <h3>CFSAAS Tutorials</h3>
   <p>CFSAAS Tutorials</p>
</cflayoutarea>
            
</cflayout>

Note: Each Accordion Navigation generated using CFLayout tag will have a + or - button on the title area for to expand and collapse the accordion. By default the layout area will expand and collapse by clicking anywhere in the accordion title bar. This can be prevented by using the attribute "titleCollapse" which makes the layout area will be expandable and collapsible only by clicking the "+" or "-" button in the title bar.


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes