template::CSS proc class (public)
template::CSS class [ -toolkit toolkit ] name
Defined in packages/xotcl-core/tcl/01-debug-procs.tcl
In case, a mapping for CSS classes is defined, return the mapping for the provided class name. Otherwise return the input class name unmodified.
- Switches:
- -toolkit (optional)
- Parameters:
- name (required)
- Testcases:
- No testcase defined.
Source code: # # In case, a mapping for CSS classes is defined, return the # mapping for the provided class name. Otherwise return the # input class name unmodified. # if {![info exists toolkit]} { set toolkit ${:preferredCSSToolkit} if {$toolkit eq "default"} { set toolkit [template::toolkit] set :preferredCSSToolkit $toolkit ns_log notice "derived CSS toolkit '$toolkit'" } } if {[nsv_get acs_templating_cssClasses $toolkit dict]} { if {[dict exists $dict $name]} { return [dict get $dict $name] } } else { ns_log warning "template::CSS: no class mapping for" "toolkit $toolkit provided (should be in theme definition)" } if {[dict exists ${:cssClasses} $toolkit $name]} { return [dict get ${:cssClasses} $toolkit $name] } else { return $name }XQL Not present: Generic, PostgreSQL, Oracle