subsite_navigation::define_pageflow (public)

 subsite_navigation::define_pageflow [ -subsite_id subsite_id ] \
    [ -show_applications_p show_applications_p ] \
    [ -no_tab_application_list no_tab_application_list ] \
    [ -initial_pageflow initial_pageflow ] \
    [ -navigation_multirow navigation_multirow ] [ -group group ] \
    [ -subgroup subgroup ] [ -include_all ]

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

Defines the page flow of the subsite. This sets up a navigation multirow as defined by the default master installed by openacs, which renders it as one or more rows of tabs. The standard CSS defines classes for two rows of tabs, if you want more, you must define your own CSS classes. If the navigation multirow doesn't exist, we create it.

Switches:
-subsite_id (optional)
The package id of the subsite we're interested in (defaults to current)
-show_applications_p (optional, defaults to "1")
If true, autogenerate tabs for applications (not declared boolean because the tabbed master takes this from a package parameter)
-no_tab_application_list (optional)
A list of application package keys to ignore when autogenerating tabs for applications
-initial_pageflow (optional)
Add these subsections before computing the rest of the page flow
-navigation_multirow (optional, defaults to "navigation")
The name of the multirow used to build the nav bars
-group (optional, defaults to "main")
Group name for the primary section
-subgroup (optional, defaults to "sub")
Group name for the subsection (opened under a selected tab)
-include_all (optional, boolean, defaults to "false")
Per default, only the subgroup of the currently selected top menu is return. When -include_all is specified, the resulting multirow contains all subgroups (useful for pull-down menus)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/admin/tabbed-master-dotlrn.tcl packages/acs-subsite/ www/admin/tabbed-master-dotlrn.tcl subsite_navigation::define_pageflow subsite_navigation::define_pageflow packages/acs-subsite/www/admin/tabbed-master-dotlrn.tcl->subsite_navigation::define_pageflow packages/acs-subsite/www/admin/tabbed-master-turquois.tcl packages/acs-subsite/ www/admin/tabbed-master-turquois.tcl packages/acs-subsite/www/admin/tabbed-master-turquois.tcl->subsite_navigation::define_pageflow packages/acs-subsite/www/admin/tabbed-master.tcl packages/acs-subsite/ www/admin/tabbed-master.tcl packages/acs-subsite/www/admin/tabbed-master.tcl->subsite_navigation::define_pageflow packages/acs-subsite/www/shared/tabbed-master.tcl packages/acs-subsite/ www/shared/tabbed-master.tcl packages/acs-subsite/www/shared/tabbed-master.tcl->subsite_navigation::define_pageflow packages/acs-subsite/www/tabbed-master.tcl packages/acs-subsite/ www/tabbed-master.tcl packages/acs-subsite/www/tabbed-master.tcl->subsite_navigation::define_pageflow ad_conn ad_conn (public) subsite_navigation::define_pageflow->ad_conn ad_file ad_file (public) subsite_navigation::define_pageflow->ad_file subsite::get_element subsite::get_element (public) subsite_navigation::define_pageflow->subsite::get_element subsite_navigation::add_section_row subsite_navigation::add_section_row (private) subsite_navigation::define_pageflow->subsite_navigation::add_section_row subsite_navigation::get_pageflow_struct subsite_navigation::get_pageflow_struct (public) subsite_navigation::define_pageflow->subsite_navigation::get_pageflow_struct

Testcases:
No testcase defined.
Source code:
    if { $subsite_id eq "" } {
        set subsite_id [ad_conn subsite_id]
    }

    set pageflow [subsite_navigation::get_pageflow_struct  -subsite_id $subsite_id  -initial_pageflow $initial_pageflow  -show_applications_p $show_applications_p  -no_tab_application_list $no_tab_application_list]
    set base_url [subsite::get_element -subsite_id $subsite_id -element url]

    if { ![template::multirow exists $navigation_multirow] } {
        template::multirow create $navigation_multirow group label href target  title lang accesskey class id tabindex name parent display_template
    }

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

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

        set selected_p [add_section_row  -subsite_id $subsite_id  -array section_a  -base_url $base_url  -group $group  -multirow $navigation_multirow]

        if { $include_all_p || $selected_p } {
            foreach { subsection_name subsection_spec } $section_a(subsections) {
                array set subsection_a {
                    label {}
                    title {}
                    folder {}
                    url {}
                    selected_patterns {}
                    accesskey {}
                    display_template {}
                }
                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  -subsite_id $subsite_id  -array subsection_a  -base_url $base_url  -group $subgroup  -multirow $navigation_multirow  -parent $section_a(name)
            }
        }
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: