(Quick Reference)

controllerName

Purpose

Returns the name of the currently executing controller

Examples

class ExamplesTagLib {

    def showControllerName = { attrs, body ->
        out << "Executing controller: ${controllerName}"
    }

}
<g:showControllerName />

Description

Returns the name of the currently executing controller which is dictated by the URL mappings