
META-INF.semanticcms-file.tld Maven / Gradle / Ivy
Show all versions of semanticcms-file-taglib Show documentation
]]>
@{description.html} ]]> @{project.name} @{parsedVersion.majorVersion}.@{parsedVersion.minorVersion}.@{parsedVersion.incrementalVersion} file @{project.url} Writes a link to a file. Supports optional desktop integration mode. If OpenFile is enabled, the connection is from localhost, and not exporting, creates a
file:///…
URL to the file so that it may be opened locally by the browser. Will additionally open from the server-side when JavaScript enabled.If there is no body, will write the filename followed by the file size.
OpenFile must be explicitly enabled by setting the
com.semanticcms.openfile.servlet.OpenFile.enabled
context parameter totrue
.For security, OpenFile may only be called from localhost. However, be careful when behind a proxy, as external proxied requests can appear to come from localhost.
OpenFile may be enabled for development but disabled in production by selectively including the semanticcms-openfile-servlet dependency by profile. By not including the dependency in production builds, the code is not simply disabled, but is not even included in production.
The onclick AJAX file opening is disabled when the documents are exporting, as set by the
]]>X-com-semanticcms-core-exporting: true
header.file com.semanticcms.file.taglib.FileTag scriptless The id used in URL anchors. If not provided, is generated from the label. Must be unique per page. Ids generated from labels will be unique, but may change as page structure changes. ]]> id false java.lang.String The book containing the file. Defaults to the book of the current JSP file. ]]> book false java.lang.String The page-relative path to the file. ]]> path true java.lang.String When true
, the file is displayed on the page but not added to the list of files on the page. Defaults tofalse
. ]]>hidden false true boolean true Checks if the given page, or optionally any of its child pages, has at least one not-hidden File. ]]> hasFile com.semanticcms.file.taglib.Functions boolean hasFile(com.semanticcms.core.model.Page,boolean) ${file:hasFile(page, recursive)} Determines if local file opening is allowed. Uses reflection to avoid hard dependency on semanticcms-openfile-servlet.
OpenFile must be explicitly enabled by setting the
com.semanticcms.openfile.servlet.OpenFile.enabled
context parameter totrue
.For security, OpenFile may only be called from localhost. However, be careful when behind a proxy, as external proxied requests can appear to come from localhost.
OpenFile may be enabled for development but disabled in production by selectively including the semanticcms-openfile-servlet dependency by profile. By not including the dependency in production builds, the code is not simply disabled, but is not even included in production.
]]>isOpenFileAllowed com.semanticcms.file.taglib.Functions boolean isOpenFileAllowed() ${file:isOpenFileAllowed()}]]>