xowiki::FormPage instproc is_folder_page (public)

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

Defined in /var/www/openacs.org/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 (optional, defaults to "true")
return true, if the current page is a link to a folder.
Returns:
boolean

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: