subsite::new_subsite_theme (public)

 subsite::new_subsite_theme -key key -name name -template template \
    [ -css css ] [ -js js ] [ -form_template form_template ] \
    [ -list_template list_template ] \
    [ -list_filter_template list_filter_template ] \
    [ -dimensional_template dimensional_template ] \
    [ -resource_dir resource_dir ] [ -streaming_head streaming_head ] \
    [ -local_p local_p ] [ -create_or_replace ]

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

Add a new subsite theme, making it available to the theme configuration code.

Switches:
-key (required)
-name (required)
-template (required)
-css (optional)
-js (optional)
-form_template (optional)
-list_template (optional)
-list_filter_template (optional)
-dimensional_template (optional)
-resource_dir (optional)
-streaming_head (optional)
-local_p (optional, defaults to "true")
-create_or_replace (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_subsite_api subsite_api (test acs-subsite) subsite::new_subsite_theme subsite::new_subsite_theme test_subsite_api->subsite::new_subsite_theme db_0or1row db_0or1row (public) subsite::new_subsite_theme->db_0or1row db_dml db_dml (public) subsite::new_subsite_theme->db_dml subsite::update_subsite_theme subsite::update_subsite_theme (public) subsite::new_subsite_theme->subsite::update_subsite_theme openacs_bootstrap3_theme::apm::after_install openacs_bootstrap3_theme::apm::after_install (private) openacs_bootstrap3_theme::apm::after_install->subsite::new_subsite_theme openacs_bootstrap5_theme::apm::after_install openacs_bootstrap5_theme::apm::after_install (private) openacs_bootstrap5_theme::apm::after_install->subsite::new_subsite_theme openacs_default_theme::install::after_install openacs_default_theme::install::after_install (private) openacs_default_theme::install::after_install->subsite::new_subsite_theme subsite::save_theme_parameters_as subsite::save_theme_parameters_as (private) subsite::save_theme_parameters_as->subsite::new_subsite_theme

Testcases:
subsite_api
Source code:
    # the following line is for Oracle compatibility
    set local_p [expr {$local_p ? "t" : "f"}]

    if {$create_or_replace_p
        && [db_0or1row check_theme {select 1 from subsite_themes where key = :key}]
    } {
        subsite::update_subsite_theme  -key $key  -name $name  -template $template  -css $css  -js $js  -form_template $form_template  -list_template $list_template  -list_filter_template $list_filter_template  -dimensional_template $dimensional_template  -resource_dir $resource_dir  -streaming_head $streaming_head  -local_p $local_p
        return
    }

    db_dml insert_subsite_theme {
      insert into subsite_themes
        (key, name, template, css, js, form_template, list_template,
        list_filter_template, dimensional_template, resource_dir,
        streaming_head, local_p)
      values
        (:key, :name, :template, :css, :js, :form_template, :list_template,
        :list_filter_template, :dimensional_template, :resource_dir,
        :streaming_head, :local_p)
    }
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: