template::head::prepare_multirows (private)

 template::head::prepare_multirows

Defined in packages/acs-templating/tcl/head-procs.tcl

Generate multirows for meta, css, scripts Called only from blank-master.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl template::head::prepare_multirows template::head::prepare_multirows packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::head::prepare_multirows template::head::flush_link template::head::flush_link (public) template::head::prepare_multirows->template::head::flush_link template::head::included_in template::head::included_in (private) template::head::prepare_multirows->template::head::included_in template::head::resolve_urn template::head::resolve_urn (private) template::head::prepare_multirows->template::head::resolve_urn template::multirow template::multirow (public) template::head::prepare_multirows->template::multirow template::prepare_body_script_multirow template::prepare_body_script_multirow (private) template::head::prepare_multirows->template::prepare_body_script_multirow

Testcases:
No testcase defined.
Source code:

    # Generate the <meta> tag multirow
    variable ::template::head::metas
    template::multirow create meta name content http_equiv scheme lang
    if {[array exists metas]} {
        foreach name [array names metas] {
            foreach {http_equiv name scheme content lang} $metas($name) {
                template::multirow append meta  $name  $content  $http_equiv  $scheme  $lang
            }
        }
        unset metas
    }

    # Generate the <link> tag multirow
    variable ::template::head::links

    #
    # Filter out included links, such we have to do this only once.
    #
    foreach name [array names links] {
        lassign [split $name ,] rel href
        set container [::template::head::included_in $href]
        if {$container ne ""} {
            set container [template::head::resolve_urn $container]
            if {[array names links *,$container] ne ""} {
                template::head::flush_link -href $href -rel $rel
            }
        }
    }

    template::multirow create link rel type href title lang media order crossorigin integrity
    if {[array exists links]} {
        # first non alternate stylesheet
        foreach name [array names links] {
            foreach {rel href type media title lang order crossorigin integrity} $links($name) {
                if {$rel ne "alternate stylesheet"} {
                    template::multirow append link  $rel  $type  [resolve_urn $href]  $title  $lang  $media  $order  $crossorigin $integrity
                    set links($name""
                }
            }
        }
        # order the stylesheets before adding alternate ones
        template::multirow sort link order
        # now alternate stylesheet
        foreach name [array names links] {
            foreach {rel href type media title lang order crossorigin integrity} $links($name) {
                if {$links($name) ne ""} {
                    template::multirow append link  $rel  $type  [resolve_urn $href]  $title  $lang  $media  $order  $crossorigin $integrity
                    set links($name""
                }
            }
        }
        unset -nocomplain links
    }

    # Generate the <style /> tag multirow
    variable ::template::head::styles
    template::multirow create ___style type title lang media style
    if {[array exists styles]} {
        foreach name [array names styles] {
            foreach {type media title lang style} $styles($name) {
                template::multirow append ___style  $type  $title  $lang  $media  $style
            }
        }
        unset -nocomplain styles
    }

    # Generate the head <script /> tag multirow
    variable ::template::head::scripts

    template::multirow create headscript type src charset defer async content order crossorigin integrity
    if {[array exists scripts]} {

        foreach name [array names scripts] {

            set container [::template::head::included_in $name]
            if {$container ne ""} {
                set container [template::head::resolve_urn $container]
                if {[array names scripts $container] ne ""} {
                    continue
                }
            }

            foreach {type src charset defer async content order crossorigin integrity} $scripts($name) {
                #ns_log notice "ADD order $order src $src"
                template::multirow append headscript  $type  [resolve_urn $src]  $charset  $defer  $async  $content  $order  $crossorigin $integrity
            }
        }
        template::multirow sort headscript order
        unset -nocomplain scripts
    }
    template::prepare_body_script_multirow
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: