How does the taglib look like? Looking at the usage it should be as below:
class SomeTagLib {
static namespace = "custom"
static returnObjectForTags = ['tag']
def tag = { attrs, body ->
//returns an object (can be boolean)
}
}
By default, taglibs would return StreamCharBuffer. If you need an object to be returned, (as in your case to be used as part of conditional statement), I guess you would need returnObjectFromTags
as shown above. It specifies which tag deviates from default behavior and returns an object instead.
Also, you should be using the taglib as mentioned by Tim:
<g:if test="${custom.tag() && other.boolean}"> //should be the appropriate way