BoxLang 🚀 A New JVM Dynamic Language Learn More...
The Official BoxLang Waffle Module
By default, this module will show delicious pictures of waffles from the Flicker API. You can override the image tags to search for with the following config in your config/boxlang.json
file inside the BoxLang server home.
{
"modules": {
"bx-waffle": {
"settings": {
"imageTags": [
"apple",
"pie"
]
}
}
}
}
This setting will change the default picture to be of apple pies. You can also override the image tags below as well.
There are many ways to add waffles to your app.
Create and use the waffle service directly
<bx:output>
#new bxModules.waffle.models.WaffleService().getWaffleEmbed()#
</bx:output>
Or override the tags:
<bx:output>
#new bxModules.waffle.models.WaffleService().getWaffleEmbed( [ "apple", "pie" ] )#
</bx:output>
Use our waffle custom tag for markup
In BoxLang files
<bx:_waffle>
In CF files:
<cf_waffle>
Or override the tags:
<bx:_waffle imageTags="apple,pie">
Get the waffle embed code:
embedHTML = getWaffle();
echo( embedHTML );
Directly output the embed code to the page:
embedWaffle()
Pass an array of tags to either BIF to override:
embedWaffle( ["apple", "pie"] )
Or, like our custom tag, but sexier, call our waffle component.
From BoxLang tags:
<bx:waffle />
From BoxLang script:
bx:waffle;
From CFML Tags
<cfwaffle />
From CFML script:
waffle;
// or
cfWaffle();
Or, pass an override of image tags to any of those versions:
<bx:waffle imageTags="apple,pie">
or
bx:waffle imageTags="apple,pie";
$
box install bx-waffle