xowiki::FormPage instproc is_folder_page (public)

 <instance of xowiki::FormPage[i]> is_folder_page \
    [ -include_folder_links include_folder_links ]

Defined in packages/xowiki/tcl/xowiki-procs.tcl

Check, if FormPage is a folder. A FormPage is a folder when its page template is the folder.form or if this is a link pointing to a folder.

Switches:
-include_folder_links
(defaults to "true") (optional)
return true, if the current page is a link to a folder.
Returns:
boolean

Partial Call Graph (max 5 caller/called nodes):
%3 test_xowiki_test_cases xowiki_test_cases (test xowiki) xowiki::FormPage instproc is_folder_page xowiki::FormPage instproc is_folder_page test_xowiki_test_cases->xowiki::FormPage instproc is_folder_page

Testcases:
xowiki_test_cases
Source code:
#
# Make sure, the page_template is instantiated
#
if {![nsf::is object ::${:page_template}]} {
  ::xo::db::CrClass get_instance_from_db -item_id ${:page_template}
}
set page_template_name [${:page_template} name]
if {$page_template_name eq "en:folder.form"} {
  return 1
} elseif {$include_folder_links && $page_template_name eq "en:link.form"} {
  set link_type [:get_property_from_link_page link_type]
  return [expr {$link_type eq "folder_link"}]
} else {
  return 0
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: