Oracle® Fusion Middleware Technical Reference Guide for Site Studio 11g Release 1 (11.1.1) E10615-02 |
|
![]() Previous |
![]() Next |
This section covers the following topics:
Site Studio depends on a collection of runtime files to deliver a fully-functioning web site. When you change the site hierarchy of a web site, these files are affected, which is why you are prompted to update the runtime files when you change the site hierarchy in Designer.
The runtime files are stored in the runtime folder for the web site (where cs_name is the name of your content server and siteid is your web site):
cs_name\weblayout\websites\siteid
The following files are automatically generated:
The sitenavigation.js file contains the necessary JavaScript to define the web site hierarchy. Some of the navigation fragments in Site Studio were designed to read the information from this file and dynamically generate a navigation scheme for the web site using client-side JavaScript.
Sitenavigation.js contains the NavNode object definition, which represents a single node (also referred to as a "section" in the Designer interface) of the site hierarchy. It has properties that are generated from the true section properties stored in the web site project file.
In addition to these standard properties, the NavNode object also contains a member variable for every custom section property that has been assigned a value for this section. The naming convention for these variables is "cp_XXX" (where XXX is the custom section property name). These data members are constructed by parsing the additional parameters passed to a NavNode constructor; the format for the additional parameters are "name==value" strings (see definition of g_navNode_0_0 in sample code below). These additional parameters are automatically generated by Site Studio when you regenerate your runtime JavaScript files.
The sitenavigation.js file also contains the declaration for the active site hierarchy in terms of NavNode objects, which are defined from a single root node using a well-known name (g_navNode_Root). This value is then made available to the navigation fragments to examine, as appropriate.
Here is an example:
var g_navNode_Root = new NavNode('9001','Home',ssUrlPrefix + 'index.htm',null,'PageTitle==Ravenna Hosting Tutorial Site'); g_navNode_1=g_navNode_Root.addNode('9002','Products',ssUrlPrefix + 'Products/index.htm','PageTitle==Ravenna Hosting Products'); g_navNode_1_0=g_navNode_1.addNode('9003','Servers',ssUrlPrefix + 'Products/Servers/index.htm','MainNavIcon==/idcm1/groups/public/documents/rvh_image/rvh_navicon_1.gif','PageTitle==Ravenna Hosting Servers'); g_navNode_1_0_0=g_navNode_1_0.addNode('9004','Web Servers',ssUrlPrefix + 'Products/Servers/WebServers/index.htm','MainNavIcon==/idcm1/groups/public/documents/rvh_image/rvh_navicon_2.gif','PageTitle==Ravenna Hosting Web Servers','SidebarProductsListBanner==webservers'); g_navNode_1_0_1=g_navNode_1_0.addNode('9005','Database Servers',ssUrlPrefix + 'Products/Servers/DatabaseServers/index.htm','MainNavIcon==/idcm1/groups/public/documents/rvh_image/rvh_navicon_3.gif','PageTitle==Ravenna Hosting Database Servers','SidebarProductsListBanner==databaseservers'); g_navNode_1_0_2=g_navNode_1_0.addNode('9006','Application Servers',ssUrlPrefix + 'Products/Servers/ApplicationServers/index.htm','MainNavIcon==/idcm1/groups/public/documents/rvh_image/rvh_navicon_4.gif','PageTitle==Ravenna Hosting Application Servers','SidebarProductsListBanner==applicationservers'); g_navNode_1_0_3=g_navNode_1_0.addNode('9007','File Servers',ssUrlPrefix + 'Products/Servers/FileServers/index.htm','MainNavIcon==/idcm1/groups/public/documents/rvh_image/rvh_navicon_5.gif','PageTitle==Ravenna Hosting File Servers','SidebarProductsListBanner==fileservers'); g_navNode_1_0_4=g_navNode_1_0.addNode('9008','Mail Servers',ssUrlPrefix + 'Products/Servers/MailServers/index.htm','MainNavIcon==/idcm1/groups/public/documents/rvh_image/rvh_navicon_6.gif','PageTitle==Ravenna Hosting Mail Servers','SidebarProductsListBanner==mailservers');
The NavNode definition and the JavaScript methods in the sitenavigation.js file are obtained from the Site Studio component resources each time the runtime files are regenerated. Only the hierarchy of NavNode objects is generated dynamically. If you want to change any of the other JavaScript, you need to update or override the component resources.
The sitenavigationfunctions.js file provides methods used for client-side JavaScript navigation mechanisms. The definitions for the client-side ID-based hyperlink functions, link() and nodelink() methods, for instance, are both stored in this file.
The sitenavigation.xml file contains an XML definition of the active site hierarchy, which can be made available to server-side script. Some navigation fragments are built to read the information provided by this file. They then use the information to dynamically generate the navigation scheme for the web site with server-side script instead of client-side JavaScript.
The XML definition has a single <site> tag as the root. This tag contains a hierarchy of <section> tags to define each section.
Here is an example:
<site id="9001" level="0" parent="" label="Home" href="index.htm" PageTitle="Ravenna Hosting Tutorial Site"> <section id="9002" level="1" label="Products" href="Products/index.htm" PageTitle="Ravenna Hosting Products"> <section id="9003" level="2" label="Servers" href="Products/Servers/index.htm" MainNavIcon="/idcm1/groups/public/documents/rvh_image/rvh_navicon_1.gif" PageTitle="Ravenna Hosting Servers"> <section id="9004" level="3" label="Web Servers" href="Products/Servers/WebServers/index.htm" MainNavIcon="/idcm1/groups/public/documents/rvh_image/rvh_navicon_2.gif" PageTitle="Ravenna Hosting Web Servers" SidebarProductsListBanner="webservers"></section> <section id="9005" level="3" label="Database Servers" href="Products/Servers/DatabaseServers/index.htm" MainNavIcon="/idcm1/groups/public/documents/rvh_image/rvh_navicon_3.gif" PageTitle="Ravenna Hosting Database Servers" SidebarProductsListBanner="databaseservers"></section> <section id="9006" level="3" label="Application Servers" href="Products/Servers/ApplicationServers/index.htm" MainNavIcon="/idcm1/groups/public/documents/rvh_image/rvh_navicon_4.gif" PageTitle="Ravenna Hosting Application Servers" SidebarProductsListBanner="applicationservers"></section> <section id="9007" level="3" label="File Servers" href="Products/Servers/FileServers/index.htm" MainNavIcon="/idcm1/groups/public/documents/rvh_image/rvh_navicon_5.gif" PageTitle="Ravenna Hosting File Servers" SidebarProductsListBanner="fileservers"></section> <section id="9008" level="3" label="Mail Servers" href="Products/Servers/MailServers/index.htm" MainNavIcon="/idcm1/groups/public/documents/rvh_image/rvh_navicon_6.gif" PageTitle="Ravenna Hosting Mail Servers" SidebarProductsListBanner="mailservers"></section></section>
The sitenavigation.hda file contains a persistent representation of the SiteStudioNavNodes ResultSet that can be made available with the ssLoadSiteNavResultSet() script extension. It contains a definition of the active site hierarchy, which can be made available to server-side script. Some navigation fragments are built to read the information provided by this ResultSet. They then use the information to dynamically generate the navigation scheme for the web site with server-side script instead of client-side JavaScript.
The "SiteStudioNavNodes" ResultSet has five columns:
nodeId: the unique identifier for the node.
parentNodeId: the unique identifier for the parent node.
label: the label for the node.
level: the depth of the node in the site hierarchy; the root section has a level of 0.
href: the site relative path–based URL to the node's primary page.
The sitenavigation_co.hda file contains the same structure as the sitenavigation.hda file, but the "SiteStudioNavNodes" result set also includes contributor-only nodes.
The wcm.toggle.js file contains the JavaScript necessary to provide contribution functionality on a web site. Most significantly, the wcm.contributor.OnKeyDown()
function, which is where the keyboard sequence to enter contribution mode (Ctrl + Shift + F5) can be changed to another sequence, if desired.
To change the default keystroke combination, perform these tasks:
Browse to the following directory (where CS-Dir is the installation location of your content server):
CS-Dir
\custom\SiteStudio\publish\resources\wcm\sitestudio\
Open wcm.toggle.js in a text editor.
Locate the function OnKeyDown.
Change the implementation of this function to use a different keystroke combination that will call wcm.contributor.toggle.
This function uses virtual key codes to determine the key combination entered by the user. The default value is Ctrl+Shift+F5. The F5 key has a virtual key code of 116 (or 0x74 in hexadecimal). The codes for the other typical function keys, F1 through F12 are 112 (0x70) through 123 (0x7B), respectively.
Save and close wcm.toggle.js.
Note: The next time you upgrade Site Studio or install a patch, you may need to perform these steps again to retain your keystroke combination. |
Note: The key codes used to determine the keystrokes should be given special consideration in instances where contributors may use different operating systems, since the virtual key codes may vary among operating systems. |