%3 ::xowiki::Includelet ::xowiki::Includelet → available_includelets → describe_includelets → glob_clause → html_encode → html_id → html_to_text → js_encode → js_name → listing → locale_clause → parent_id_clause → publish_status_clause → require_YUI_CSS → require_YUI_JS category_clause get_current_folder get_page_order include_head_entries initialize js_name resolve_page_name screen_name tableWidget ::xo::Context ::xo::Context exists_query_parameter export_vars get_all_query_parameter get_parameters initialize original_url_and_query process_query_parameter query_parameter set_query_parameter unset_query_parameter ::xowiki::Includelet->::xo::Context ::xo::ConnectionContext ::xo::ConnectionContext → require → require_package_id_from_url cache cache_exists cache_get cache_set cache_unset eval_as_user exists_form_parameter exists_parameter form_parameter get_all_form_parameter get_parameter get_user_id init lang load_form_parameter load_form_parameter_from_values perconnection_parameter_get_all perconnection_parameter_set_all permission query_parameter requestor require_form_parameter returnredirect role=admin role=all role=app_group_member role=community_member role=creator role=registered_user role=swa role=unregistered_user set_parameter set_user_id unset_parameter ::xo::ConnectionContext->::xo::Context ::xotcl::Object ::xotcl::Object ::xo::Context->::xotcl::Object ::xowiki::includelet::categories-recent ::xowiki::includelet::categories-recent include_head_entries initialize render ::xowiki::includelet::categories-recent->::xowiki::Includelet ::xowiki::includelet::presence ::xowiki::includelet::presence render ::xowiki::includelet::presence->::xowiki::Includelet ::xowiki::includelet::recent ::xowiki::includelet::recent render ::xowiki::includelet::recent->::xowiki::Includelet ::xowiki::includelet::unresolved-references ::xowiki::includelet::unresolved-references render ::xowiki::includelet::unresolved-references->::xowiki::Includelet ::xowiki::includelet::form-stats ::xowiki::includelet::form-stats render ::xowiki::includelet::form-stats->::xowiki::Includelet ::xowiki::includelet::link-with-local-return-url ::xowiki::includelet::link-with-local-return-url render ::xowiki::includelet::link-with-local-return-url->::xowiki::Includelet ::xowiki::includelet::personal-notification-messages ::xowiki::includelet::personal-notification-messages → get_messages_response → message_add → message_dismiss → modal_message_dialog → modal_message_dialog_register_submit initialize render ::xowiki::includelet::personal-notification-messages->::xowiki::Includelet ::xowiki::includelet::wf-todo ::xowiki::includelet::wf-todo initialize render render_ical ::xowiki::includelet::wf-todo->::xowiki::Includelet ::xowiki::includelet::available-includelets ::xowiki::includelet::available-includelets render ::xowiki::includelet::available-includelets->::xowiki::Includelet ::xowiki::includelet::folders ::xowiki::includelet::folders build_sub_tree build_tree collect_folders folder_query include_head_entries render ::xowiki::includelet::folders->::xowiki::Includelet ::xowiki::includelet::toc ::xowiki::includelet::toc → anchor build_navigation build_toc cache_includelet_data count current href include_head_entries initialize page_name page_number parent_id position render render_list render_tree render_yui_list yui_ajax yui_non_ajax ::xowiki::includelet::toc->::xowiki::Includelet ::xowiki::includelet::PageReorderSupport ::xowiki::includelet::PageReorderSupport ::xowiki::includelet::toc->::xowiki::includelet::PageReorderSupport instmixin ::xowiki::includelet::item-button ::xowiki::includelet::item-button get_page initialize render_button ::xowiki::includelet::item-button->::xowiki::Includelet ::xowiki::includelet::set-parameter ::xowiki::includelet::set-parameter render ::xowiki::includelet::set-parameter->::xowiki::Includelet ::xowiki::includelet::my-refers ::xowiki::includelet::my-refers render ::xowiki::includelet::my-refers->::xowiki::Includelet ::xowiki::includelet::last-visited ::xowiki::includelet::last-visited render ::xowiki::includelet::last-visited->::xowiki::Includelet ::xowiki::includelet::references-graph ::xowiki::includelet::references-graph render ::xowiki::includelet::references-graph->::xowiki::Includelet ::xowiki::includelet::current-irc-log ::xowiki::includelet::current-irc-log render ::xowiki::includelet::current-irc-log->::xowiki::Includelet ::xowiki::includelet::LTI-LaunchButton ::xowiki::includelet::LTI-LaunchButton init render_form_button ::xowiki::includelet::LTI-LaunchButton->::xowiki::Includelet ::xowiki::includelet::flowplayer ::xowiki::includelet::flowplayer include_head_entries render ::xowiki::includelet::flowplayer->::xowiki::Includelet ::xowiki::includelet::graph ::xowiki::includelet::graph graphHTML ::xowiki::includelet::graph->::xowiki::Includelet ::xowiki::includelet::get ::xowiki::includelet::get render ::xowiki::includelet::get->::xowiki::Includelet ::xowiki::includelet::most-popular ::xowiki::includelet::most-popular render ::xowiki::includelet::most-popular->::xowiki::Includelet ::xowiki::includelet::my-categories ::xowiki::includelet::my-categories render ::xowiki::includelet::my-categories->::xowiki::Includelet ::xowiki::includelet::creation-date ::xowiki::includelet::creation-date render ::xowiki::includelet::creation-date->::xowiki::Includelet ::xowiki::includelet::html-file ::xowiki::includelet::html-file href page_number render ::xowiki::includelet::html-file->::xowiki::Includelet ::xowiki::includelet::random-form-page ::xowiki::includelet::random-form-page → page_names render ::xowiki::includelet::random-form-page->::xowiki::Includelet ::xowiki::includelet::exam-top-includelet ::xowiki::includelet::exam-top-includelet render ::xowiki::includelet::exam-top-includelet->::xowiki::Includelet ::xowiki::includelet::s5 ::xowiki::includelet::s5 render render_overview render_slideshow slideshow_header ::xowiki::includelet::s5->::xowiki::Includelet ::xowiki::includelet::iframe ::xowiki::includelet::iframe render ::xowiki::includelet::iframe->::xowiki::Includelet ::xowiki::includelet::digg ::xowiki::includelet::digg render ::xowiki::includelet::digg->::xowiki::Includelet ::xowiki::includelet::community-link ::xowiki::includelet::community-link render ::xowiki::includelet::community-link->::xowiki::Includelet ::xowiki::includelet::available-formfields ::xowiki::includelet::available-formfields class_name render render_as_tree ::xowiki::includelet::available-formfields->::xowiki::Includelet ::xowiki::includelet::chat_room ::xowiki::includelet::chat_room render ::xowiki::includelet::chat_room->::xowiki::Includelet ::xowiki::includelet::form-menu ::xowiki::includelet::form-menu render ::xowiki::includelet::form-menu->::xowiki::Includelet ::xowiki::includelet::unread-items ::xowiki::includelet::unread-items render ::xowiki::includelet::unread-items->::xowiki::Includelet ::xowiki::includelet::categories ::xowiki::includelet::categories category_tree_edit_button category_tree_missing include_head_entries initialize render ::xowiki::includelet::categories->::xowiki::Includelet ::xowiki::includelet::rss-button ::xowiki::includelet::rss-button render ::xowiki::includelet::rss-button->::xowiki::Includelet ::xowiki::includelet::vspace ::xowiki::includelet::vspace render ::xowiki::includelet::vspace->::xowiki::Includelet ::xowiki::includelet::yui-carousel ::xowiki::includelet::yui-carousel form_images images render ::xowiki::includelet::yui-carousel->::xowiki::Includelet ::xowiki::includelet::my-references ::xowiki::includelet::my-references render ::xowiki::includelet::my-references->::xowiki::Includelet ::xowiki::includelet::my-yahoo-publisher ::xowiki::includelet::my-yahoo-publisher render ::xowiki::includelet::my-yahoo-publisher->::xowiki::Includelet ::xowiki::includelet::timeline ::xowiki::includelet::timeline render ::xowiki::includelet::timeline->::xowiki::Includelet ::xowiki::includelet::kibana ::xowiki::includelet::kibana → check_permission → grant_permission → url include_head_entries render ::xowiki::includelet::kibana->::xowiki::Includelet ::xowiki::includelet::most-frequent-visitors ::xowiki::includelet::most-frequent-visitors render ::xowiki::includelet::most-frequent-visitors->::xowiki::Includelet ::xowiki::includelet::form-usages ::xowiki::includelet::form-usages generate_voting_form render ::xowiki::includelet::form-usages->::xowiki::Includelet ::xowiki::includelet::chat ::xowiki::includelet::chat render ::xowiki::includelet::chat->::xowiki::Includelet ::xowiki::includelet::book ::xowiki::includelet::book render render_images render_item render_items ::xowiki::includelet::book->::xowiki::Includelet ::xowiki::includelet::book->::xowiki::includelet::PageReorderSupport instmixin ::xowiki::includelet::child-resources ::xowiki::includelet::child-resources render types_to_show ::xowiki::includelet::child-resources->::xowiki::Includelet ::xowiki::includelet::delicious ::xowiki::includelet::delicious render ::xowiki::includelet::delicious->::xowiki::Includelet ::xowiki::includelet::selection ::xowiki::includelet::selection render render_children ::xowiki::includelet::selection->::xowiki::Includelet ::xowiki::includelet::selection->::xowiki::includelet::PageReorderSupport instmixin ::xowiki::includelet::countdown-timer ::xowiki::includelet::countdown-timer render ::xowiki::includelet::countdown-timer->::xowiki::Includelet ::xowiki::includelet::my-tags ::xowiki::includelet::my-tags render ::xowiki::includelet::my-tags->::xowiki::Includelet ::xowiki::includelet::tags ::xowiki::includelet::tags render ::xowiki::includelet::tags->::xowiki::Includelet ::xowiki::includelet::bookmarklet-button ::xowiki::includelet::bookmarklet-button render ::xowiki::includelet::bookmarklet-button->::xowiki::Includelet ::xowiki::includelet::gravatar ::xowiki::includelet::gravatar → url render ::xowiki::includelet::gravatar->::xowiki::Includelet ::xowiki::includelet::rss-client ::xowiki::includelet::rss-client initialize render ::xowiki::includelet::rss-client->::xowiki::Includelet ::xowiki::includelet::my-general-comments ::xowiki::includelet::my-general-comments render ::xowiki::includelet::my-general-comments->::xowiki::Includelet ::xowiki::includelet::view-item-button ::xowiki::includelet::view-item-button render ::xowiki::includelet::view-item-button->::xowiki::includelet::item-button ::xowiki::includelet::create-item-button ::xowiki::includelet::create-item-button render ::xowiki::includelet::create-item-button->::xowiki::includelet::item-button ::xowiki::includelet::delete-item-button ::xowiki::includelet::delete-item-button render ::xowiki::includelet::delete-item-button->::xowiki::includelet::item-button ::xowiki::includelet::copy-item-button ::xowiki::includelet::copy-item-button render ::xowiki::includelet::copy-item-button->::xowiki::includelet::item-button ::xowiki::includelet::edit-item-button ::xowiki::includelet::edit-item-button render ::xowiki::includelet::edit-item-button->::xowiki::includelet::item-button ::xowiki::includelet::launch-zoom ::xowiki::includelet::launch-zoom render ::xowiki::includelet::launch-zoom->::xowiki::includelet::LTI-LaunchButton ::xowiki::includelet::launch-jupyter ::xowiki::includelet::launch-jupyter render ::xowiki::includelet::launch-jupyter->::xowiki::includelet::LTI-LaunchButton ::xowiki::includelet::launch-bigbluebutton ::xowiki::includelet::launch-bigbluebutton render ::xowiki::includelet::launch-bigbluebutton->::xowiki::includelet::LTI-LaunchButton ::xowiki::includelet::activity-graph ::xowiki::includelet::activity-graph render ::xowiki::includelet::activity-graph->::xowiki::includelet::graph ::xowiki::includelet::collab-graph ::xowiki::includelet::collab-graph render ::xowiki::includelet::collab-graph->::xowiki::includelet::graph ::xowiki::includelet::user-timeline ::xowiki::includelet::user-timeline render ::xowiki::includelet::user-timeline->::xowiki::includelet::timeline ::xowiki::includelet::slidy ::xowiki::includelet::slidy render_items ::xowiki::includelet::slidy->::xowiki::includelet::book ::xowiki::includelet::jquery-spacegallery ::xowiki::includelet::jquery-spacegallery render_items ::xowiki::includelet::jquery-spacegallery->::xowiki::includelet::book ::xowiki::includelet::jquery-infinite-carousel ::xowiki::includelet::jquery-infinite-carousel render_items ::xowiki::includelet::jquery-infinite-carousel->::xowiki::includelet::book ::xowiki::includelet::jquery-cloud-carousel ::xowiki::includelet::jquery-cloud-carousel render_items ::xowiki::includelet::jquery-cloud-carousel->::xowiki::includelet::book ::xowiki::includelet::jquery-carousel ::xowiki::includelet::jquery-carousel render_items ::xowiki::includelet::jquery-carousel->::xowiki::includelet::book ::xowiki::includelet::composite-form ::xowiki::includelet::composite-form render ::xowiki::includelet::composite-form->::xowiki::includelet::selection

Class ::xowiki::Includelet

::xowiki::Includelet[i] create ... \
           [ -__decoration (default "portlet") ] \
           [ -id id ] \
           [ -name (default "") ] \
           [ -parameter_declaration (default "") ] \
           [ -title (default "") ]

Defined in

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xo::Context[i]
  • subclass: ::xowiki::includelet::categories-recent[i], ::xowiki::includelet::presence[i], ::xowiki::includelet::recent[i], ::xowiki::includelet::unresolved-references[i], ::xowiki::includelet::form-stats[i], ::xowiki::includelet::link-with-local-return-url[i], ::xowiki::includelet::personal-notification-messages[i], ::xowiki::includelet::wf-todo[i], ::xowiki::includelet::available-includelets[i], ::xowiki::includelet::folders[i], ::xowiki::includelet::toc[i], ::xowiki::includelet::item-button[i], ::xowiki::includelet::set-parameter[i], ::xowiki::includelet::my-refers[i], ::xowiki::includelet::last-visited[i], ::xowiki::includelet::references-graph[i], ::xowiki::includelet::current-irc-log[i], ::xowiki::includelet::LTI-LaunchButton[i], ::xowiki::includelet::flowplayer[i], ::xowiki::includelet::graph[i], ::xowiki::includelet::get[i], ::xowiki::includelet::most-popular[i], ::xowiki::includelet::my-categories[i], ::xowiki::includelet::creation-date[i], ::xowiki::includelet::html-file[i], ::xowiki::includelet::random-form-page[i], ::xowiki::includelet::exam-top-includelet[i], ::xowiki::includelet::s5[i], ::xowiki::includelet::iframe[i], ::xowiki::includelet::digg[i], ::xowiki::includelet::community-link[i], ::xowiki::includelet::available-formfields[i], ::xowiki::includelet::chat_room[i], ::xowiki::includelet::form-menu[i], ::xowiki::includelet::unread-items[i], ::xowiki::includelet::categories[i], ::xowiki::includelet::rss-button[i], ::xowiki::includelet::vspace[i], ::xowiki::includelet::yui-carousel[i], ::xowiki::includelet::my-references[i], ::xowiki::includelet::my-yahoo-publisher[i], ::xowiki::includelet::timeline[i], ::xowiki::includelet::kibana[i], ::xowiki::includelet::most-frequent-visitors[i], ::xowiki::includelet::form-usages[i], ::xowiki::includelet::chat[i], ::xowiki::includelet::book[i], ::xowiki::includelet::child-resources[i], ::xowiki::includelet::delicious[i], ::xowiki::includelet::selection[i], ::xowiki::includelet::countdown-timer[i], ::xowiki::includelet::my-tags[i], ::xowiki::includelet::tags[i], ::xowiki::includelet::bookmarklet-button[i], ::xowiki::includelet::gravatar[i], ::xowiki::includelet::rss-client[i], ::xowiki::includelet::my-general-comments[i]
::xotcl::Class create ::xowiki::Includelet \
     -superclass ::xo::Context

Methods (to be applied on the object)

  • available_includelets (scripted)

    unset -nocomplain :html
    :describe_includelets [::xowiki::Includelet info subclass]
    set result "<ul>"
    foreach d [lsort [array names :html]] {
      append result "<li>" [set :html($d)] "</li>" \n
    }
    append result "</ul>"
    return $result
  • describe_includelets (scripted)

    #:log "--plc=$includelet_classes "
    foreach cl $includelet_classes {
      set result ""
      append result "{{<b>[namespace tail $cl]</b>"
      foreach p [$cl info parameter] {
        if {[llength $p] != 2} continue
        lassign $p name value
        if {$name eq "parameter_declaration"} {
          foreach pp $value {
            #append result ""
            switch [llength $pp] {
              1 {append result $pp"}
              2 {
                set v [lindex $pp 1]
                if {$v eq ""} {set v {""}}
                append result " [lindex $pp 0] <em>[ns_quotehtml $v]</em>"
              }
            }
            #append result "\n"
          }
        }
      }
      append result "}}\n<p>"
      set index [::xo::api object_index "" $cl]
      if {[nsv_exists api_library_doc $index]} {
        set doc_elements [nsv_get api_library_doc $index]
        append result [lindex [dict get $doc_elements main] 0]
      }
      set :html([namespace tail $cl]) $result
      :describe_includelets [$cl info subclass]
    }
  • glob_clause (scripted)

    # Return a clause for name matching.
    # value uses * for matching
    set glob [string map [list * %] $value]
    return " and $base_table.$attribute like '$glob'"
  • html_encode (scripted)

     xowiki::Includelet[i] html_encode

    Testcases:
    create_folder_with_page, xowf, create_workflow_with_instance, create_form_with_form_instance
    # &apos; is not a known entity to some validators, so we use the
    # numerical entity here for encoding "'"
    return [string map [list & "&amp;" < "&lt;" > "&gt;" \" "&quot;" ' "&#39;"$string]
  • html_id (scripted)

    # Construct a valid HTML id or name.
    # For details, see http://www.w3.org/TR/html4/types.html
    #
    # For XOTcl object names, strip first the colons
    set name [string trimleft $name :]
    
    # make sure, the ID starts with characters
    if {![regexp {^[A-Za-z]} $name]} {
      set name id_$name
    }
    
    # replace unwanted characters
    regsub -all -- {[^A-Za-z0-9_.-]} $name _ name
    return $name
  • html_to_text (scripted)

    return [string map [list "&amp;" &] $string]
  • js_encode (scripted)

    string map [list \n \\n \" {\"} ' {\'}] $string
  • js_name (scripted)

    return ID[string map [list : _ # _] $name]
  • listing (scripted)

    if {$count} {
      set attribute_selection "count(*)"
      set orderby ""      ;# no need to order when we count
      set page_number  ""      ;# no pagination when count is used
    } else {
      set attribute_selection "i.name, r.title, p.page_id, r.publish_date,  r.mime_type, i.parent_id, o.package_id,  to_char(r.publish_date,'YYYY-MM-DD HH24:MI:SS') as formatted_date"
    }
    if {$page_number ne ""} {
      set limit $page_size
      set offset [expr {$page_size*($page_number-1)}]
    } else {
      set limit ""
      set offset ""
    }
    set parent_id_clause [::xowiki::Includelet parent_id_clause  -base_table i  -use_package_path $use_package_path  -parent_id $parent_id  -base_package_id $package_id]
    
    if {$glob ne ""} {
      append extra_where_clause [::xowiki::Includelet glob_clause -base_table i $glob]
    }
    
    set sql [::xo::dc select  -vars $attribute_selection  -from "cr_items i, cr_revisions r, xowiki_page p, acs_objects o"  -where "$parent_id_clause  and r.revision_id = i.live_revision  and i.item_id = o.object_id  and p.page_id = r.revision_id  and i.publish_status <> 'production' $extra_where_clause"  -orderby $orderby  -limit $limit -offset $offset]
    
    if {$count} {
      return [::xo::dc get_value count_listing $sql]
    } else {
      set s [::xowiki::Page instantiate_objects -sql $sql]
      return $s
    }
  • locale_clause (scripted)

    set default_locale [::$package_id default_locale]
    set system_locale ""
    
    set with_system_locale [regexp {(.*)[+]system} $locale _ locale]
    if {$locale eq "default"} {
      set locale $default_locale
      set include_system_locale 0
    }
    #:msg "--L with_system_locale=$with_system_locale, locale=$locale, default_locale=$default_locale"
    
    set locale_clause ""
    if {$locale ne ""} {
      set locale_clause " and $revisions.nls_language = '$locale'"
      if {$with_system_locale} {
        set system_locale [lang::system::locale -package_id $package_id]
        #:msg "system_locale=$system_locale, default_locale=$default_locale"
        if {$system_locale ne $default_locale} {
          set locale_clause " and ($revisions.nls_language = '$locale'
        or $revisions.nls_language = '$system_locale' and not exists
          (select 1 from cr_items i where i.name = '[string range $locale 0 1]:' ||
          substring($items.name,4) and i.parent_id = $items.parent_id))"
        }
      }
    }
    
    #:msg "--locale $locale, def=$default_locale sys=$system_locale, cl=$locale_clause locale_clause=$locale_clause"
    return [list $locale $locale_clause]
  • parent_id_clause (scripted)

    #
    # Get the package path and from it, the folder_ids. The parent_id
    # of the returned pages should be a direct child of the folder.
    #
    if {$parent_id eq ""} {
      set parent_id [::$base_package_id folder_id]
    }
    set packages [::$base_package_id package_path]
    if {$use_package_path && [llength $packages] > 0} {
      set parent_ids [list $parent_id]
      foreach p $packages {lappend parent_ids [$p folder_id]}
      return "$base_table.parent_id in ([ns_dbquotelist $parent_ids])"
    } else {
      return "$base_table.parent_id = [ns_dbquotevalue $parent_id]"
    }
  • publish_status_clause (scripted)

    set table_prefix ""
    if {$base_table ne ""} {
      set table_prefix "$base_table."
    }
    set publish_status_clause ""
    if {$value ne "all"} {
      set valid_states {production ready live expired}
      set clauses [list]
      foreach state [split $value |] {
        if {$state ni $valid_states} {
          error "no such state: '$state'; valid states are: production, ready, live, expired"
        }
        lappend clauses "${table_prefix}publish_status='$state'"
      }
      if {[llength $clauses] > 0} {
        set publish_status_clause " and ([join $clauses { or }])"
      }
    }
    return $publish_status_clause
  • require_YUI_CSS (scripted)

    if {$ajaxhelper} {
      ::xo::Page requireCSS "/resources/ajaxhelper/yui/$path"
    } else {
      ::xo::Page requireCSS "//yui.yahooapis.com/$version/build/$path"
      security::csp::require style-src yui.yahooapis.com
    }
  • require_YUI_JS (scripted)

    if {$ajaxhelper} {
      ::xo::Page requireJS "/resources/ajaxhelper/yui/$path"
    } else {
      ::xo::Page requireJS "//yui.yahooapis.com/$version/build/$path"
      security::csp::require script-src yui.yahooapis.com
    }

Methods (to be applied on instances)

  • __decoration (setter)

  • category_clause (scripted)

    # the category_spec has the syntax "a,b,c|d,e", where the values are category_ids
    # pipe symbols are or-operations, commas are and-operations;
    # no parenthesis are permitted
    set extra_where_clause ""
    set or_names [list]
    set ors [list]
    foreach cid_or [split $category_spec |] {
      set ands [list]
      set and_names [list]
      foreach cid_and [split $cid_or ,] {
        if {![nsf::is integer $cid_and]} {
          ad_return_complaint 1 "invalid category id '$cid_and'"
          ad_script_abort
        }
        lappend and_names [::category::get_name $cid_and]
        lappend ands "exists (select 1 from category_object_map  where object_id = $item_ref and category_id = [ns_dbquotevalue $cid_and])"
      }
      lappend or_names [join $and_names { and }]
      lappend ors "([join $ands { and }])"
    }
    if {$ors eq "()"} {
      set cnames ""
    } else {
      set cnames [join $or_names { or }]
      set extra_where_clause "and ([join $ors { or }])"
    }
    #:log "--cnames $category_spec -> $cnames // <$extra_where_clause>"
    return [list $cnames $extra_where_clause]
  • get_current_folder (scripted)

    set package_id [${:__including_page} package_id]
    #:log "get_current_folder: including_page current_folder $current_folder '[$current_folder name]'"
    
    if {$parent eq ".."} {
      set current_folder [${:__including_page} parent_id]
      ::xo::db::CrClass get_instance_from_db -item_id $current_folder
    } elseif {$parent eq "."} {
      set current_folder ${:__including_page}
    } elseif {$parent eq "/"} {
      # set current_folder to the package folder
      set current_folder [::$package_id folder_id]
    } else {
      set page [::$package_id get_page_from_item_ref  -use_package_path true  -use_site_wide_pages true  -use_prototype_pages true  -default_lang [string range ${:locale} 0 1]  -parent_id [${:__including_page} parent_id]  $parent]
      if {$page ne ""} {
        set current_folder $page
      } else {
        ns_log warning "could not fetch folder via item_ref '$parent'"
        set current_folder ${:__including_page}
      }
    }
    #:log "get_current_folder: parent $parent, current_folder $current_folder '[$current_folder name]', folder is formPage [$current_folder istype ::xowiki::FormPage]"
    
    if {![$current_folder istype ::xowiki::FormPage]} {
      # current folder has to be a FormPage
      set current_folder [$current_folder parent_id]
      #:log "###### use parent of current folder $current_folder '[$current_folder name]'"
    
      if {![$current_folder istype ::xowiki::FormPage]} {
        error "get_current_folder not included from a FormPage"
      }
    }
    return $current_folder
  • get_page_order (scripted)

    #
    # first check, if we can load the page_order from the page
    # denoted by source
    #
    if {[info exists source]} {
      set p [:resolve_page_name $source]
      if {$p ne ""} {
        set ia [$p set instance_attributes]
        if {[dict exists $ia pages]} {
          set pages [dict get $ia pages]
        } elseif {[dict exists $ia ordered_pages]} {
          set ordered_pages [dict get $ia ordered_pages]
        }
      }
    }
    
    # compute a list of ordered_pages from pages, if necessary
    if {[info exists ordered_pages]} {
      foreach {order page} $ordered_pages {set :page_order($page$order}
    } else {
      set i 0
      foreach page $pages {set :page_order($page) [incr i]}
    }
  • id (setter)

  • include_head_entries (scripted)

    # The purpose of this method is to contain all calls to include
    # CSS files, JavaScript, etc. in the HTML head. This kind of
    # requirement could as well be included e.g. in render, but this
    # won't work, when the result of "render" is cached.  This method
    # is called before render to be executed even when render is not
    # due to caching.  It is intended to be overloaded by subclasses.
  • initialize (scripted)

    # This method is called at a time after init and before render.
    # It can be used to alter specified parameter from the user,
    # or to influence the rendering of a decoration (e.g. title etc.)
  • js_name (scripted)

    return [[self class] js_name [self]]
  • name (setter)

  • parameter_declaration (setter)

  • resolve_page_name (scripted)

    return [${:__including_page} resolve_included_page_name $page_name]
  • screen_name (scripted)

    set screen_name [acs_user::get_user_info -user_id $user_id -element screen_name]
    if {$screen_name eq ""} {
      set screen_name [person::get_person_info -person_id $user_id -element name]
    }
    return $screen_name
  • tableWidget (scripted)

    return [expr {[::template::CSS toolkit] in {bootstrap5 bootstrap}
                  ? "::xowiki::BootstrapTable"
                  : "TableWidget" }]
  • title (setter)