subsite::define_pageflow (public)

 subsite::define_pageflow [ -sections_multirow sections_multirow ] \
    [ -subsections_multirow subsections_multirow ] \
    [ -section section ] [ -url url ]

Defined in packages/acs-subsite/tcl/subsite-procs.tcl

Defines the page flow of the subsite TODO: add an image TODO: add link_p/selected_p for subsections

Switches:
-sections_multirow (optional, defaults to "sections")
-subsections_multirow (optional, defaults to "subsections")
-section (optional)
-url (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/group-master.tcl packages/acs-subsite/ www/group-master.tcl subsite::define_pageflow subsite::define_pageflow packages/acs-subsite/www/group-master.tcl->subsite::define_pageflow ad_file ad_file (public) subsite::define_pageflow->ad_file subsite::add_section_row subsite::add_section_row (public) subsite::define_pageflow->subsite::add_section_row subsite::get_element subsite::get_element (public) subsite::define_pageflow->subsite::get_element subsite::get_pageflow_struct subsite::get_pageflow_struct (public) subsite::define_pageflow->subsite::get_pageflow_struct template::multirow template::multirow (public) subsite::define_pageflow->template::multirow

Testcases:
No testcase defined.
Source code:
    set pageflow [get_pageflow_struct -url $url]
    if {$url eq ""} {
        set base_url [subsite::get_element -element url]
    } else {
        set base_url $url
    }

    template::multirow create $sections_multirow name label title url selected_p link_p

    template::multirow create $subsections_multirow name label title url selected_p link_p

    foreach { section_name section_spec } $pageflow {
        array set section_a {
            label {}
            url {}
            title {}
            subsections {}
            folder {}
            selected_patterns {}
        }

        array set section_a $section_spec
        set section_a(name) $section_name

        set selected_p [add_section_row  -array section_a  -base_url $base_url  -multirow $sections_multirow]

        if { $selected_p } {
            foreach { subsection_name subsection_spec } $section_a(subsections) {
                array set subsection_a {
                    label {}
                    title {}
                    folder {}
                    url {}
                    selected_patterns {}
                }
                array set subsection_a $subsection_spec
                set subsection_a(name) $subsection_name
                set subsection_a(folder) [ad_file join $section_a(folder) $subsection_a(folder)]

                add_section_row  -array subsection_a  -base_url $base_url  -multirow $subsections_multirow
            }
        }
    }
XQL Not present:
Generic
PostgreSQL XQL file:
packages/acs-subsite/tcl/subsite-procs-postgresql.xql

Oracle XQL file:
packages/acs-subsite/tcl/subsite-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: