4-6 Oracle Fusion Middleware Developers Guide for Oracle Universal Content Management
Bundling is accomplished by using the PublishedBundles table in the std_resources.htm file.
table PublishedBundles table border=1captionstrong
tr tdbundlePathtd
tdincludeClasstd tdexcludeClasstd
tdloadOrdertd
tr tr
tdresourcesbundle.jstd tdjavascript:commontd
tdtd td128td
tr . . .
table end
The columns in this table are as follows:
■
bundlePath: The eventual location where the bundle is published. This path is relative to the weblayout directory.
■
includeClass: This is used to determine which resources to include in a bundle.
■
excludeClass: This is used to determine which resources to exclude from a bundle.
■
loadOrder: The order in which the includeClass and excludeClass filters are applied.
In the previous example, files of the javascript:common class are published to a single bundle located at resourceslayoutscommonBundle.js. The contents of all
bundled files that match this class are appended to form a single file to be stored at that location.
4.1.3.2 Referencing Published Files
Most published files both bundled and unbundled must be directly referenced from within HTML to be included in a page. It can therefore be difficult to know exactly
which files to include for a given situation, especially when bundling can be enabled or disabled by server administrators. A simple Idoc Script method can be used to
easily and transparently include all of the files you need on a given page.
For example, if you write a page that includes all files associated with the javascript:common bundle as described previously, then do not write HTML that
includes all of the files mentioned in the first table in addition to the bundle mentioned in the second, the server is asked for each file. This negates the purpose of bundling
because the server is pinged for each file whether it actually exists or not.
To correctly include these files on a page, use the following Idoc Script and include it from somewhere within the HEAD of the page:
exec createPublishedResourcesListjavascript:common loop PublishedResources
script language=JavaScript src=HttpWebRootPublishedResources.path script
endloop
Changing the Look and Navigation of the Oracle Content Server Interface 4-7
This code fragment includes all javascript:common files even if bundling is switched off. If javascript instead of javascript:common is passed, all files
whose class starts with javascript are included.
This PublishedResources result set is sorted by loadOrder so files and bundles with the lowest loadOrder are included first. Files with a greater loadOrder can
override JavaScript methods or CSS styles that were declared earlier.
4.2 Using Dynamic Server Pages to Alter the Navigation of Web Pages
This section describes how to use the building blocks necessary for creating dynamic server pages to alter the navigation of web pages.
This chapter includes the following sections:
■
Section 4.2.1, About Dynamic Server Pages
■
Section 4.2.2, Page Types
■
Section 4.2.3, Creating Dynamic Server Pages
■
Section 4.2.4, Syntax
■
Section 4.2.5, Idoc Script Functions
■
Section 4.2.6, Development Recommendations
■
Section 4.2.7, HCSF Pages
■
Section 4.2.8, Working with Dynamic Server Pages
4.2.1 About Dynamic Server Pages
Dynamic server pages are files that are checked in to Oracle Content Server and then used to generate web pages dynamically. Dynamic server pages are typically used to
alter the look-and-feel and navigation of web pages. For example, dynamic server pages can be used to:
■
Create web pages to be published through Content Publisher
■
Implement HTML forms
■
Maintain a consistent look-and-feel throughout a web site Dynamic server pages include the following file formats:
■
IDOC : A proprietary scripting language
■
HCST : Hypertext Content Server Template, similar to a standard Oracle Content
Server template page stored in the IdcHomeDirresourcescoretemplates directory.
■
HCSP : Hypertext Content Server Page, an HTML-compliant version of the HCST
page, usually used for published content.
■
HCSF : Hypertext Content Server Form, similar to HCSP and HCST pages, but
containing HTML form fields that can be filled out and submitted from a web browser
When you use dynamic server pages, Oracle Content Server assembles web pages dynamically using a custom template HCST, HCSP, or HCSF file that you have
checked in to Oracle Content Server. The template calls HTML includes from a text file IDOC file you have also checked in to Oracle Content Server.