I would like a custom tag with attributes that have a default value set if the attribute is not provided.
A very basic example would be a custom tag that renders out an inline SVG icon. It would be called like this
<icon:user> or like this
In the custom tag I have a cfparam set up that as far as I can tell should handle this
<cfparam name="attributes.color" type="text" default="currentColor" />
But when I try to access attributes.color in my code, I get this error:
key [COLOR] doesn't exist
If I dump the attributes scope, it’s empty.
I can resolve this by checking whether it exists and setting the default value in the code, but I could swear that setting a default attribute like this used to work. And jumping through hoops to have a default value seems counter productive.
I can only seem to find documentation about the CFC based implementation of custom tags for Lucee, which is really not what I’m after.