WebFrame attributes

Available webframe attributes

The webframe attributes are a tool for fine tuning some of the advanced capabilities of the webframe. They are to a large extend the same for each webframe type, but some of the webframes also have very specific attributes available. All webframe attributes are applied via the "General settings" tab of the webframe settings page.

In general, the attributes can be categorized on two large groups:

  • Functional attributes - they influence the business logic of the webframe. They are in most cases specific for the webframe type. Most common are the webframe cache attributes and the attributes of managing the visibility of the webframe (hide a webframe or show it only to a specific group of users or username).
  • HTML attributes - using them, will result in altered generation of the HTML output of the webframe. They are in most cases general for all webframes and used for applying attributes to the HTML tags that the webframe renders

Additionally, each webframe type/package can apply its own set of attributes. Read the dedicated webframe documentation page on wordframe.com for further information

Functional attributes

attributevalueDescription
force-invisible:username string representing a username The webframe will not be visible if the currently logged user username matched the string. Applied before checking the "force-visible:username" attribute. Example: If a user has username that prohibits him of seeing the webframe, it will be applied, no matter that he may have roles that are allowing him to see it. The "force-visible: username" or "force-invisible: username" are executed with priority over the roles, keys and data options.
force-visible:username string representing a username The webframe will be visible if the currently logged user username matched the string. Applied after the "force-invisible:username" attribute. The "force-visible: username" or "force-invisible: username" are executed with priority over the roles, keys and data options.
force-invisible:roles comma separated roles list The webframe will not be visible for all users that have the listed roles assigned. Applied before checking the "force-visible:roles" attribute. Example: If a user has role that prohibits him of seeing the webframe, it will be applied, no matter that he may have roles that are allowing him to see it.The "force-visible: roles" or "force-invisible: roles" are executed with priority over the keys and data options.
force-visible:roles comma separated roles list The webframe will be visible only for users that have the listed roles assigned. Applied after the "force-invisible:roles" attribute. Example: If a user has role that prohibits him of seeing the webframe, it will be applied, no matter that he may have roles that are allowing him to see it.The "force-visible: roles" or "force-invisible: roles" are executed with priority over the keys and data options.
force-invisible:keys comma separated data variable keys list The webframe will not be visible, if there are page data variables defined in the listed keys. When there is no "force-invisible:values" attribute defined, the value of the defined keys does not matter, if it is different than empty string.
force-invisible:values comma separated data variable values list The webframe will not be visible if there is a data variable with value define in the listed values. When there is "force-invisible:keys" attribute defined, only their values are checked.
force-visible:keys comma separated data variable keys list The webframe will be visible only, if there are page data variables defined with the listed keys. When there is no "force-visible:values" attribute defined, the value of the defined keys does not matter, if it is different than empty string.
force-visible:values comma separated data variable values list The webframe will be visible only if there is a data variable with value define in the listed values. When there is "force-invisible:keys" attribute defined, only their values are checked.
force-visible: smartbrowse  true or false  If true, the webframe will be presented only while the smartbrowse mode is ON. If false the attribute will not be applied at all.
force-invisible: smartbrowse   true or false  If true, the webframe will NOT be presented while the smartbrowse mode is ON. If false the attribute will not be applied at all.
manage:restriction  true or fase  If true, the Manager role users will not be able to see the "Manage" link in the smartbrowse right click context menu. If false, the attribute will not be applied.
cache:duration integer in seconds How much seconds the webframe should cache its content and reuse it without updating it. The cache is based on pages and whether it is applied for any user or only not registered (guests). Default value is 0 (cache disabled).
cache:users
  • all
  • guests
If "all" value is set, all the users will see the same webframe content. If "guests" value is set, all the users will see the same webframe content. Should not be used if you need user specific content. Default value is "guests".
cache:expiration
  • absolute
  • sliding
If "absolute" value is set, the cache will expire on each "cache-duration" period and will be updated. If "sliding" value is set, the cache will expire only if the webframe is not visited within the "cache-duration" period. If the webframe is visited, new "cache-duration" period will be added, without expiring or updating the cache. As example if sliding timescale of 60 minutes is set and someone browses to the webframe page every 55 minutes, the cache will never be expired. Default value is "absolute".
cache:scope
  • webframe-data
  • webframe-html
  • url-data (default)
  • node-url-html
  • full-url-html
The cache attributes determines the data type and scope of the cached object, as follows:
  • webframe-data - the cached object for the webframe will be the same on all pages and will contain only values set in the internal webframes business logic (if any)
  • webframe-html - the cached object for the webframe will be the same on all pages and will contain the rendered html of the webframe, no matter the business logic.
  • url-data - the cached object for the webframe will be different for each page and will contain only values set in the internal webframes business logic (if any).
  • node-url-html - the cached object for the webframe will be different for each page, without considering the possible query parameters in the url, and will contain the rendered html of the webframe, no matter the business logic.
  • node-url-html - the cached object for the webframe will be different for each URL, including the possible query parameters in the url, and will contain the rendered html of the webframe, no matter the business logic. (eg. the same page / node url but with different query parameters are considered as different URLs)

HTML attributes

Attributes applied to the webframe's "DIV" tag

These attributes should be applied in the webframe's "General settings" section.

attributevalueDescription
wrapper:visibility true or false The 'wrapper:visibility' attribute determines whether the system's div wrapper around the webframe, should be rendered.
id free input The "id" attribute assigns an unique identifier to the element. This identifier should be unique for the page and can be used to refer to that element.
Example: <div id="para-1">
class free input The "class" attribute assigns a class name (or a list of class names separated by spaces) to the element. It's used with style sheets and tells the browser the class to which the element is associated with.
The system will automatically add class "wf" to all webframe wrappers
Example: <div class="menu">
style free input Defines a visual style of this element according to the CSS standards.
Example: <div style="color:#333333; border: none;">
title free input Gives a short description about the element shown as a "tool tip" when the user points the mouse over the element.
Example: <div title="this is a description">
lang HTML lang codes Specifies the language of the element's content.
Example: <div lang="en">
dir
  • RTL
  • LTR
The text direction of the element's contents - "right to left (RTL)" or "left to right (LTR)"
Example: <div dir="LTR">
align
  • left
  • center
  • right
  • justify
Specifies the horizontal alignment of its element.
Example: <div align="left">
onclick script Script to run when the element is clicked on
Example: <div onclick="my_script()">
ondblclick script Script to run when the element is double clicked on
Example: <div ondblclick="my_script()">
onmousedown script Script to run when a mouse button is pressed over the element
Example: <div onmousedown="my_script()">
onmouseup script Script to run when a mouse button is released over the element
Example: <div onmouseup="my_script()">
onmouseover script Script to run when the mouse pointer is over the element
Example: <div onmouseover="my_script()">
onmousemove script Script to run when a mouse pointer moves over the element
Example: <div onmousemove="my_script()">
onmouseout script Script to run when a mouse pointer moves out of the element
Example: <div onmouseout="my_script()">
onkeypress script Script to run when a keyboard button is pressed and released over the element
Example: <div onkeypress="my_script()">
onkeydown script Script to run when a keyboard button is only pressed over the element
Example: <div onkeydown="my_script()">
onkeyup script Script to run when a keyboard button is only released over the element
Example: <div onkeyup="my_script()">