Fragments Cascading Style Sheets

Understanding Site Studio Web Sites 3-23 Contributor Data Files Contributor data files are XML files that are created by Site Studio. Each contributor data file is associated with one and only one region definition that defines its content class in terms of its constituent elements see Region Templates and Region Definitions on page 3-14. For example, if a region definition comprises four elements called Title, Subtitle, Body_Text, and Image, then all contributor data files associated with that region definition contain these same four elements. Each element in the contributor data file can be edited in accordance with the element definition associated with that element in the region definition see Elements and Element Definitions on page 3-13. The element definitions specify the editing options that are available to contributors when they edit an element in a contributor data file. Some elements may be set up to be plain text only with very limited formatting capability, while others might be WYSIWYG What You See Is What You Get, which generally offers a much broader editing experience. The content of contributor data files can easily be reused on a Web site; that is, it can be displayed in different locations on a site, either completely or partially different elements, depending on where it is used. It is worth noting that when contributors edit a contributor data file, they see all its elements in the Contributor editor, even if only some elements are actually displayed in the contribution region being edited. The other elements may be used elsewhere on the Web site, so editing that information may affect other pages on the site. See the Users Guide for Site Studio Contributor for more information on working with contributor data files. Native Documents Native documents are files that are created using familiar third-party applications such as Microsoft Word. They are converted to HTML format using Dynamic Converter so that they are viewable on the Web site. Dynamic Converter uses conversion rules and templates to decide how to convert a native document. Native documents are edited using their associated application for example, Microsoft Word for .doc files. The content of native documents can also be reused on a Web site, although native documents are generally not as flexible in their reusability as contributor data files. Contrary to contributor data files, native documents are not necessarily segmented into small, reusable chunks of information; their structure is often much more free-flowing. That said, judicious use of styles and other formatting features in Microsoft Word may overcome some reusability drawbacks of native documents. One important benefit of using native documents is that most contributors are already quite familiar with, say, Microsoft Word, which makes this application an easy and convenient editing environment for the site content. See Chapter 10.8, Working With Native Documents for more information on native documents.

3.15 Fragments

Fragments are chunks of code that enhance the functionality of a Site Studio Web site. They are essentially containers for HTML, Idoc Script, JavaScript, JSP, ASP, and referenced files images, CSS, includes, and so on. Examples of fragments would be a breadcrumb trail, a navigation bar, or a copyright notice in a footer. The fragment specification is written in XML and is stored in a fragment library along with other fragments, if you choose. The fragment library comprises a single XML file that describes its contents and a zip file that stores all of the assets used by each fragment. Fragment libraries are stored in the content server. Several default fragment 3-24 Oracle Fusion Middleware Users Guide for Site Studio Designer libraries with many predefined samples are automatically checked in when you install the Site Studio component on the content server. The predefined fragments come in four categories: navigation fragments, dynamic list fragments, static list fragments, and other fragments. Each category contains a variety of fragments in multiple scripting languages. You can use any fragment as-is or copy and edit the fragment to suit your needs. You can also create fragments from scratch. See Appendix C, Sample Fragments for details on the fragments provided with Designer. As you start building your own fragments, you should create your own fragment libraries for these fragments. This offers several benefits: ■ You can easily track and organize where your fragments are. ■ You can easily move, copy, or back up your fragments when they are stored in your own fragment library. ■ You will not inadvertently alter a fragment created by another designer, which affects the Web sites currently using that fragment. ■ If you create a fragment from an existing fragment, you can easily revert to the original fragment, if need be. See Chapter 13, Working With Fragments for more information.

3.16 Cascading Style Sheets

Cascading style sheets CSS are a popular method to control positioning and layout of a page template. CSS files can be used in Site Studio Web sites. They are separate site assets that are stored and managed on the content server. CSS files can be edited directly in Site Studio Designer. When a CSS file is selected for editing, it opens in source view. To use CSS files on your Web site, you must reference them directly on a page template, or you can wrap them in a fragment and include that on a page template. An alternative method of controlling page layout is to use tables to place objects in specific locations on a web page. The advantage of using tables rather than CSS is that tables allow for more specific placement of objects in a more straightforward manner. Table-based page templates look more natural in design view than CSS-based page templates. However, tables can become very complex to create certain layouts, and also do not allow for other types of control that a CSS file would. For example, CSS enables you to control placement, fonts, paragraph styles, alignment, backgrounds, cell actions, and much more. When CSS is used to control layout, the applicable CSS styles for the item that the contributor is editing are made available in the toolbar if the designer has made that portion of the toolbar available in the element definition. Specific information on the capabilities of CSS is available online at www.w3c.org.

3.17 Project Files