BoxLang 🚀 A New JVM Dynamic Language Learn More...

BoxLang Waffle Generator

v1.1.1 BoxLang Modules

bx-waffle

The Official BoxLang Waffle Module

Configuration

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.

Usage

There are many ways to add waffles to your app.

WaffleService

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>

Waffle Custom Tag

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"> 

Waffle BIF

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"] )

Waffle Component

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

No collaborators yet.
 
  • {{ getFullDate("2025-02-28T03:44:02Z") }}
  • {{ getFullDate("2025-02-28T04:14:05Z") }}
  • 155
  • 15