-
-
Save boughtonp/b53044f37f069effaa21 to your computer and use it in GitHub Desktop.
Example of using namespaced attributes with fusebox lexicon.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<circuit xmnls:label="lexicons/label" label:name="Fruit and Stuff"> | |
<fuseaction name="apples" label:name="Yummy Apples"> | |
<label:PageTitle contentvariable="PageTitle" /> | |
</fuseaction> | |
</circuits> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
if (fb_.verbInfo.executionMode EQ "end") | |
{ | |
CircuitAttr = myFusebox.getApplication() | |
.circuits[ListFirst(attributes.fuseaction)] | |
.getCustomAttributes('label') | |
; | |
FuseAttr = myFusebox.getApplication() | |
.circuits[ListFirst(attributes.fuseaction)] | |
.fuseactions[ListRest(attributes.fuseaction)] | |
.getCustomAttributes('label') | |
; | |
if ( StructKeyExists( CircuitAttr , 'name' ) ) | |
{ | |
fb_appendLine('<p>Section:#CircuitAttr.name#</p>'); | |
} | |
else | |
{ | |
fb_appendLine('<p>Section:#ListFirst(attributes.fuseaction)#</p>'); | |
} | |
if ( StructKeyExists( FuseAttr , 'name' ) ) | |
{ | |
fb_appendLine('<p>Item:#FuseAttr .name#</p>'); | |
} | |
else | |
{ | |
fb_appendLine('<p>Item:#ListRest(attributes.fuseaction)#</p>'); | |
} | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment