OpenWGA 7.6 - OpenWGA Concepts and Features
PublishingContent and Layout determination on Requests
When an URL call is issued to OpenWGA there are at first two things to determine for the resulting page:
- What layout (WebTML Module) should render the page
- What should be the main context document of the page
There are two ways to determine these which differ by the used URL form.
Content Centric determination
This way is chosen when the URL ends on some kind of content id. It chooses a content document by URL, whose configured outer layout will be used as page layout. The following URLs address a document of unique name "home" in content centric determination.
/dbkey/home
/dbkey/html/default/home.de.html
The first is a short version URL of the second one and will get redirected to it, eventually substituting missing information. Even in content centric determination some information about the layout is included in the URL:
- The part "html" chooses the key of the medium in which the design to be determined will be rendered
- The URL part "default " takes a layout key and could still be used to explicitly determine a WebTML module as layout for this request. This is however seldomly used, so the predefined keyword "default" lets OpenWGA use the default layout determination described below.
- The part "home" or "home.de.html" takes any valid content id, like the content key or an unique name plus language. It always ends on the media key again, so older browsers that at first identify the content type based on a "file suffix" don't go wrong here.
This type of URL is generated in WebTML by using <tml:url type="content"> (or by omitting the type attribute).
Layout centric determination (contextless requests)
This way is chosen when the URL addresses a WebTML module explicitly in the layout key part. It chooses the layout by URL, which then is itself responsible for retrieving content documents to display and work with. The following URLs address a layout named "layout" of media key "html":/dbkey/layout
/dbkey/html/mylayout.de.html
OpenWGA here uses the the WebTML module of the given name and media key for layout. The first form is again a short form of the second one and will get redirected to it, eventually substituting missing information.
This URL-Type is generated in WebTML by using <tml:url type="layout">. We call this a "contextless request" as the WebTML layout initially will not have a content document in context but instead will start with a dummy context of the requested app. The layout however can work with all the contents in the database using the various content choosing and retrieval functions in WebTML.
This determination way is also called "application centric" as the browser user chooses a WebTML application functionality directly by URL, while the content that (eventually) is served then is chosen by the layout code itself. It is typical for web applications where in first line functionalities are served that themselves choose the content to work with.
This determination can only address WebTML modules that are marked for direct access. This is to protect the application from unintended and potentially dangerous access to WebTML modules not meant for this type of usage. In OpenWGA Developer Studio you mark a WebTML module for direct access by opening its properties (right-click the module file in package explorer > Properties), switching to TML File Metadata and enabling the checkbox Direct Access.
Mixed determination
Mixed determination means that content AND layout are both directly chosen in the URL. It is a variation of the URL form used in "content centric determination" where the layout key addresses an explicit WebTML module instead of "default". The following URL chooses the WebTML module "layout" of media key "html" for a layout and chooses a document of name "name" home as main context of it.
/dbkey/html/layout/home.de.html
This way of determination is seldomly used nowadays and mainly still available for backward compatibility. It also can only be used to address WebTML modules marked for direct access.