sitenavigation.js Runtime Auto-Generated Files

5 Site Studio Runtime Generated Files 5-1 5 Site Studio Runtime Generated Files This section covers the following topics: ■ Section 5.1, About Runtime Generated Files ■ Section 5.2, Runtime Auto-Generated Files ■ Section 5.3, wcm.toggle.js

5.1 About Runtime Generated Files

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

5.2 Runtime Auto-Generated Files

The following files are automatically generated: ■ Section 5.2.1, sitenavigation.js ■ Section 5.2.2, sitenavigationfunctions.js ■ Section 5.2.3, sitenavigation.xml ■ Section 5.2.4, sitenavigation.hda ■ Section 5.2.5, sitenavigation_co.hda

5.2.1 sitenavigation.js

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. 5-2 Oracle Fusion Middleware Technical Reference Guide for Site Studio 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 NavNode9001,Home,ssUrlPrefix + index.htm,null,PageTitle==Ravenna Hosting Tutorial Site; g_navNode_1=g_navNode_Root.addNode9002,Products,ssUrlPrefix + Productsindex.htm,PageTitle==Ravenna Hosting Products; g_navNode_1_0=g_navNode_1.addNode9003,Servers,ssUrlPrefix + ProductsServersindex.htm,MainNavIcon==idcm1groupspublicdocumentsrvh_ imagervh_navicon_1.gif,PageTitle==Ravenna Hosting Servers; g_navNode_1_0_0=g_navNode_1_0.addNode9004,Web Servers,ssUrlPrefix + ProductsServersWebServersindex.htm,MainNavIcon==idcm1groupspublicdocumen tsrvh_imagervh_navicon_2.gif,PageTitle==Ravenna Hosting Web Servers,SidebarProductsListBanner==webservers; g_navNode_1_0_1=g_navNode_1_0.addNode9005,Database Servers,ssUrlPrefix + ProductsServersDatabaseServersindex.htm,MainNavIcon==idcm1groupspublicdo cumentsrvh_imagervh_navicon_3.gif,PageTitle==Ravenna Hosting Database Servers,SidebarProductsListBanner==databaseservers; g_navNode_1_0_2=g_navNode_1_0.addNode9006,Application Servers,ssUrlPrefix + ProductsServersApplicationServersindex.htm,MainNavIcon==idcm1groupspublic documentsrvh_imagervh_navicon_4.gif,PageTitle==Ravenna Hosting Application Servers,SidebarProductsListBanner==applicationservers; g_navNode_1_0_3=g_navNode_1_0.addNode9007,File Servers,ssUrlPrefix + ProductsServersFileServersindex.htm,MainNavIcon==idcm1groupspublicdocume ntsrvh_imagervh_navicon_5.gif,PageTitle==Ravenna Hosting File Servers,SidebarProductsListBanner==fileservers; g_navNode_1_0_4=g_navNode_1_0.addNode9008,Mail Servers,ssUrlPrefix + ProductsServersMailServersindex.htm,MainNavIcon==idcm1groupspublicdocume ntsrvh_imagervh_navicon_6.gif,PageTitle==Ravenna Hosting Mail Servers,SidebarProductsListBanner==mailservers; Node propertymethod Definition m_parent Contains the parent of the current node. m_level Contains the level for the current node where 0 is the root. m_id Contains the node ID for the current node. m_label Contains the node label for the current node. m_href Contains the server relative path to this node in the site hierarchy. m_subNodes Contains the array of child nodes. addNode Can be used to add a new child node. Site Studio Runtime Generated Files 5-3 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.

5.2.2 sitenavigationfunctions.js