-
SERENA COLLAGE 5.1.
-
Copyright © 2001-2007 Serena Software, Inc. All rights reserved. This document, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by such license, no part of this publication may be reproduced, photocopied, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Serena.
-
Table of Contents Chapter 1 Welcome to Serena Collage . . . . . . . . . . . . . . . . . . . . . 7 Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Introduction to Collage Components . . . . . . . . . . . . . . . 9 About the Components . . . . . . . . . . . . . . . . . . . . . . . About Design-Time Components . . . . . . . . . . . . . . . . What are the Design-Time Components? . . . . . . . About the Layout Contribution Components . . . . . . . .
-
Table of Contents AssetQuery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 How AssetQuery Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 About Previewing AssetQuery Components. . . . . . . . . . . . . . . . . . . 32 About Nesting Multiple AssetQuery Components . . . . . . . . . . . . . . . 32 How to Insert an AssetQuery Component . . . . . . . . . . . . . . . . . . . . 33 AssetQuery Properties . . . . . . . . . . . . . . . . . . . . . .
-
Table of Contents About Image Buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to Insert a Navbar Component. . . . . . . . . . . . . . . . . . . . . Node Options for Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Data Field Macros in Button Definitions . . . . . . . . . . . . . . Navigation Bar Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . Navigation Bar Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . NavMap . . . . . . .
-
Table of Contents How the Layout Contribution Property Component Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Property Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to Insert a Layout Contribution Property Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 5 6 130 130 131 Advanced Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 135 About the Examples . . . . . . . . . . . . . . . . .
-
Welcome to Serena Collage Thank you for choosing Serena Collage, a complete web content management package. Purpose of this manual This manual provides an introduction to the Collage components, explains how to use and deploy them in your own websites, and provides complete reference information on each of the components.
-
Serena® Collage® 5.1.
-
Chapter 1 Introduction to Collage Components About the Components 10 About Design-Time Components 10 About the Layout Contribution Components 11 Components and Master Pages 12 Learning by Doing: Using the Sample Website Projects 12 Components User's Guide 9
-
Chapter 1 Introduction to Collage Components About the Components The Serena Collage components are a set of pre-built extensions that you can easily plug into your web-pages. With the push of a button in Macromedia Dreamweaver, or by adding simple HTML tags to a page, you can automate the generation of navigation bars, the personalization of web pages based on user preferences, and the retrieval of content from the Collage database or other databases, either at deploy-time or run-time.
-
About the Layout Contribution Components Component Description For details, see... Masterpage Body Defines the location on a master page where you want Collage to merge content. Wherever you insert the Masterpage Body component, Collage will merge the content from assets that use the master page when you preview or publish those assets "Masterpage Body" on page 80 MetaTag Places a piece of metadata in the page.
-
Chapter 1 Introduction to Collage Components The Layout Contribution components include: Component Description For details, see...
-
Learning by Doing: Using the Sample Website Projects This site... Sample Intranet site Includes...
-
Chapter 1 Introduction to Collage Components 14 Serena® Collage® 5.1.
-
Chapter 2 Developing and Deploying Assets that Use Components Development Requirements 16 Setting Up Component Integration with Dreamweaver 16 Inserting Components Using Dreamweaver 17 How to Manually Insert Components 18 How to Test Components 18 About Component Deployment 18 Deploying Design-Time Components 19 Deploying Layout Contribution Components 19 Components User's Guide 15
-
Chapter 2 Developing and Deploying Assets that Use Components Development Requirements This chapter describes the technical and knowledge requirements for using components in your web assets. It also explains how to set up integration with Macromedia Dreamweaver, which allows you to insert and edit components graphically.
-
Inserting Components Using Dreamweaver How to Set Up Component Integration To set up component integration: 1 In your internet browser, open the following location to display the Collage login page: http://Collage server name/servlet 2 Click the Show Options link. 3 Click the Install Authoring Components link. 4 Follow the instructions to copy the component extensions to your Dreamweaver installation.
-
Chapter 2 Developing and Deploying Assets that Use Components 6 Select the Window pull-down list and click Objects and Properties if they aren't selected. 7 In the Objects Palette, select the Serena Collage Design Components panel. 8 Click the button corresponding to the component you want to insert. See the section on the particular component you want to use for specific rules and guidelines. How to Manually Insert Components Macromedia Dreamweaver is not a requirement to use components.
-
Deploying Design-Time Components Deploying Design-Time Components No extra steps are required to set up deployment of design-time components, such as the AssetQuery and Select components. The Collage server completes all design-time component processing when you deploy assets that contain the components. The deployment web servers host the generated results of the design-time components. Because design-time components require no server-side processing, no server-side setup is necessary.
-
Chapter 2 Developing and Deploying Assets that Use Components 20 Serena® Collage® 5.1.
-
Chapter 3 Design-Time Component Reference About Design-Time Components 22 Data Field Macro Reference 23 AssetQuery 32 Banner 54 Conditional 57 Database Query 60 ForceReference 73 Include Asset 75 Masterpage Body 80 MetaTag 81 Navigation Bar 84 NavMap 95 Query Navigator 101 Select 107 WARFiler 114 Components User's Guide 21
-
Chapter 3 Design-Time Component Reference About Design-Time Components Design-time components are used to build information that depends upon other data in the project; they manage the ways that assets are presented to users. For example, you can use design-time components to create navigation bars or master pages, or merge content from multiple assets together.
-
Data Field Macro Reference Component Description For details, see... Database Query Retrieves and displays records from an external SQL database. "Database Query" on page 60 Force Reference Creates a deployment dependency between an HTML, ASP, JSP, or PHP page and another file, ensuring that changes to the file result in the deployment of the HTML, ASP, JSP, or PHP page.
-
Chapter 3 Design-Time Component Reference For example, with the Navigation Bar component, you could use macros in the following way: 1 Add the Navigation Bar component to a master page 2 Define the Navigation Bar component so that it automatically generates links to all assets in the current deploy folder 3 Use a macro to define the text for each navigation button as the name of the asset that it links to 4 Apply the master page to multiple pages, in different deploy folders When you deploy the page
-
Data Field Macro Reference How the Data Field Macros Work Each data field macro identifies the specific type of information to display about the asset, such as metadata, filename, or contribution field content. The syntax for each data field is: $type.Fieldname Where type is the type of asset, and Fieldname is the data field. For example: $node.FileName Inserts the filename of any file asset. Some fields support optional parameters, as well.
-
Chapter 3 Design-Time Component Reference The standard data fields are: Field Description approvedby If the asset has been approved, displays the name of the user who approved it. For example: $node.approvedby approveddate If the asset has been approved, displays the date when the asset was approved.For example, to display the approval date for a file asset: $node.approveddate You can include an additional parameter to format the date. For example: $node.approveddate("yyy.MMMM.
-
Data Field Macro Reference Field Description CreateDate Displays the date that the asset was created. For example: $node.CreateDate You can include an additional parameter to format the date. For example: $node.CreateDate("yyyy.MMMM.dd GGG hh:mm aaa") Will generate a date in the following format: 2001.May.10 AD 12:08 PM See "Formatting Date Fields" on page 29 for more information. creator Displays the ID of the user who created the asset, its deploy folder, or its deploy map.
-
Chapter 3 Design-Time Component Reference Field Description masterpageassetid If a master page is assigned to the asset, displays the asset ID number for the master page. For example, to display the master page ID for a file asset: $node.masterpageassetid MimeType Displays the asset's MIME-type. For example: $node.MimeType Displays the asset name. The syntax is: name $node.name Displays the deploy folder path to the asset. For example: path $node.
-
Data Field Macro Reference You can use this value to generate a link to the asset, for example: The $node.url macro generates the relative path to an asset. If you want to generate the absolute path to an asset, use the following syntax instead: $node.absurl NOTE The $node.absurl macro is not supported by the NavMap component.
-
Chapter 3 Design-Time Component Reference Symbol Description and pattern rules ' Displays any text or characters which are between the quotes " Displays a single quote, or apostrophe Example "'Today"s date is' EEEE, MMMM d, yyyy" displays "Today's date is Monday, March 3, 2002 "'Today"s date is' EEEE, MMMM d, yyyy" displays "Today's date is Monday, March 3, 2002 a d Displays "AM" or "PM" Displays the day of the month as a number D Displays the day of the year as a number E Displays
-
Data Field Macro Reference Symbol Description and pattern rules y Displays the year as a number: z yy displays the year in two digits yyy displays the full year Displays the timezone in text Example "yy" displays "02" "yyy" displays "2002" "z" displays "Pacific Standard Time" Components User's Guide 31
-
Chapter 3 Design-Time Component Reference AssetQuery This component allows you to query for assets that fulfill certain criteria and then generate HTML that can display the following: Information about those assets. For example, you can display the asset's filename, modification date, or metadata fields and values. A list of links to the files in the query. If the query returns contribution assets, you can also display the actual content that is stored in the asset's fields.
-
AssetQuery which is from the same location in the project.
-
Chapter 3 Design-Time Component Reference AssetQuery Properties Property Value Description amongblessed true or false Whether to limit the query results to assets for which the Deploy property has been set to Always. Set this property to true to limit the query. Set this property to false if you do not want to limit the query to assets that are always deployed.
-
AssetQuery Property Value Description To then generate links to the converted files, include any of the following data field macros in the body of the component: docconvert (continued) $node.psurl Links to the postscript version of the files. For example: Postscript version of $node.name Links to the postscript version of a file. $node.pdfurl Links to the PDF version of the files. For example: PDF version of $node.
-
Chapter 3 Design-Time Component Reference Property Value filter (continued) Description For date properties, you can also use the following to define more advanced filters: is null: To limit query results to assets for which a date property is undefined, for example: A.StartDate is null is not null: To limit results to assets for which any date is defined, for example: A.StartDate is not null current timestamp: To limit results based on the current (most recent) timestamp.
-
AssetQuery Property Value filter (continued) Description A.ApprovedDate: Asset approval date A.ApprovedBy: User who approved the asset A.CheckOutTime: Check out time A.Path: Deploy folder path to the asset. A.FileDate: Last modified date A.Creator: User who created the asset A.CheckOutName: User who checked out the asset A.ApprovedVersion: Approved version A.LatestVersion: Latest version A.StartDate: Start date for the asset A.
-
Chapter 3 Design-Time Component Reference Property Value levelsdeep (continued) Description NOTE The levelsdeep property is ignored if you also set the query property. For example, you might have a project that is set up as shown below, with the root property set to /website/Offices/. If levelsdeep is set to 1, AssetQuery returns all assets in the Offices folder, as well as assets in the Issaquah folder and Seattle-Downtown folder.
-
AssetQuery Property Value Description metafilter Metadata field name and value Uses metadata fields and values to narrow the query. For example: metafilter="(M.name='Reviewer') AND (M.value='Steven')" Will limit the query to assets with a metadata field called "Reviewer" with a value of "Steven." Notice that all data fields must be preceded by M. You can query multiple metadata fields at one time, by separating multiple metafilter definitions with a semicolon.
-
Chapter 3 Design-Time Component Reference Property Value metafilter (continued) Description Greater than/less than (< >) statements Greater than/less than or equal to statements (<= >=) Not equal statements (<>) For metadata fields of type asset, you can use the M.ValueAssetId statement. For example: metafilter="(M.name='MyLogo') AND (M.ValueAssetId='1000') Will limit the results to the files where the MyLogo field is pointing to asset ID '1000.
-
AssetQuery Property Value Description orderbycode Letter code for a specific sort order. Sort order of listed data. For example, orderbycode="F" Sorts the records by filename, in ascending order. Use an upper case letter code, such as "T," to sort the records in ascending order. Use a lower case letter code, such as "t," to sort the records in descending order. You can also combine multiple codes to sort on as many as 16 columns. For example, "TN" will first sort by asset type, then by asset name.
-
Chapter 3 Design-Time Component Reference Property Value Description orderonmetadata Names of metadata fields which can be used to sort results Defines metadata fields which the orderbycode property can use to order results.
-
AssetQuery Property Value Description root Path to the deploy folder The deploy folder that will be searched. For example, if root is set to "/WebSite/documents/ ", the deploy folder documents will be searched. If a query cabinet is referenced from the query property, or if a path is defined in the relative property, this parameter is ignored. skip Number Specifies the number of records that will be skipped in the query result. The skipped records begin with the first row in the query result.
-
Chapter 3 Design-Time Component Reference Property Value Description skiplevels Number Allows you to skip the specified number of folders before beginning a recursive search within your deploy folder tree. The starting point for this search is the folder defined by the root property or the relative property. For example: $node.Path$node.
-
AssetQuery Property Value Description useoriginalassetid true or false If you will use the layout property to generate contribution documents, or to format alternate versions of HTML assets, you can set the useoriginalassetid parameter to true to ensure that any components on the pages which will be reformatted by the layout pages will refer to the original assets when generating asset information, rather than referring to the layout pages.
-
Chapter 3 Design-Time Component Reference For example: Name | Created Date |
Data Fields Macro Section Each data field macro identifies the specific type of information to display about the asset, such as metadata, filename, or contribution field content. By default, all HTML contained in the body of an AssetQuery component (with the exception of the prelog and prolog sections) is repeated for each asset that is returned by the query.
-
AssetQuery Field Description $node.name Displays the asset name $node.Size Displays the asset's filesize Asset metadata. To display the value of a metadata field, you must use the following syntax: $node.meta('metadata_name') For example, $node.meta('Reviewer') URL fields. You can use the following syntax to generate the URL to the asset in the current query record: $node.url You can use this value to generate a link to the asset, for example: TIP The $node.
-
Chapter 3 Design-Time Component Reference Record information. You can use the following syntax to display the record number of the asset. $node.recordnumber The first asset in the list is record 1, the second asset in the list is record 2, and so on. The last asset gives you the total number of records returned. For detailed information on these and other data field macros that you can use with the AssetQuery component, see "Data Field Macro Reference" on page 23.
-
AssetQuery Indicates that no preceding record display will be repeated. For example, $node.FileName | $node.FileName |
Limits the record display to two: You can use , in combination with , to define unique formatting for different sets of records. For example, $node.FileName | $node.
-
Chapter 3 Design-Time Component Reference Prolog Section If a prelog section is used to open and define headers for a table which will display query records, the prolog section can be used to close the table. By combining the Prelog and Prolog sections, you can contain the entire table within the AssetQuery component tag.
-
AssetQuery Querying for Properties and Metadata The following is an example AssetQuery component with a complete AssetQuery body, including prelog and prolog sections.
-
Chapter 3 Design-Time Component Reference Querying for Contribution Field Content The following is an example AssetQuery component that retrieves and displays the content from a field in a contribution asset. PAGE 53
AssetQuery Modify the $node.contribution line to include a link to the $node.detailsurl field: - Title: $node.contribution("title") Querying by Date Below are several examples of an AssetQuery component that retrieves assets by date. These blocks of code work with the Sample Site that is installed with Collage, and can be adapted to meet the needs of your projects.
-
Chapter 3 Design-Time Component Reference You can also display a list of press releases created between two dates. The following example shows the filter property limiting the AssetQuery component to press releases created between 7/1/03 and 7/31/03: filter="(A.AssetType='Press Release') and (A.CreateDate between '7/1/ 03' AND '7/31/03')" The next example shows the filter property limiting the AssetQuery to press releases created in July of any year: filter="(A.
-
Banner How to Insert a Banner Component Follow the instructions below to insert a Banner component, either in Dreamweaver, or manually using your HTML editor. Dreamweaver 1 In Dreamweaver, place the insertion point where you want to insert the component. 2 Click Window | Objects to display the Objects palette. 3 Select the Serena Collage Design Components palette. 4 Click the Insert Banner button 5 Complete the options on the Insert Banner dialog box. 6 .
-
Chapter 3 Design-Time Component Reference Manually The syntax varies depending on whether you want to insert an image banner or a text banner. The component body (everything between the opening and closing tags) defines the text and/or image that will comprise the banner. The text or image that will be used in the banner is identified in an embedded tag.
-
Conditional Banner Properties Property Value Description classid Always set to nexus/components/ Navbar Points to the component class file inside the jar that is needed to implement the component. This field is required. code Always set to the path in Collage to the nexusComponents.jar file, such as "/System/Components/ nexusComponents.jar" The archive where the component class file is stored. By default, this is stored in: /root/System/ Components/nexusComponents.jar.
-
Chapter 3 Design-Time Component Reference Conditional Parameters The Conditional component body uses tags which identify which page the browser should be directed to if certain conditions are met. Each parameter tag must use the following format: PAGE 59
Conditional Conditional Properties Property Value Description classid Always set to "nexus/ components/Conditional" Points to the component class file inside the jar that is needed to implement the component. This property is required. code Always set to the path in Collage to the nexusComponents.jar file, such as "/System/Components/ nexusComponents.jar" or set to code="$nexusComponents" Refers to the archive where the component class file is stored. This property is required.
-
Chapter 3 Design-Time Component Reference Database Query The Database Query component displays data from records which Collage retrieves from an external SQL database. You can define and store data source information in Collage. Collage then uses these definitions to access external databases. You can also store SQL query files, which Collage runs when it connects to the data sources. The Database Component can then display the records that the queries return, with HTML formatting applied to them.
-
Database Query In order to define a data source, you must know the following about the database: The URL, or address, of the database. The URL format varies across database platforms; to learn how to specify the URL, consult the database documentation. The name of the JDBC driver you will use to access the database. In most cases, you must supply the precise Java class name and path for the driver. The name and location in Collage of the JAR file that contains the JDBC driver.
-
Chapter 3 Design-Time Component Reference 4 All data source definitions are stored in Collage as assets. Enter an Asset Name and Description, and click OK. The Edit data source dialog box appears. 5 Complete the Edit data source dialog box as follows: Field Description Guidelines Name Data source asset name Optionally modify the asset name URL JDBC URL Enter the URL, or connect-string, to the database or database server, in the correct format for the database.
-
Database Query Field Description Guidelines JDBC Driver Name and class path, if necessary, of the database driver to use Choose a database driver from the drop-down list, such as Sybase, or choose the Specify class name option, then enter the class name and path to the driver. For example, the path to the Sybase JDBC driver which Collage uses internally is: com.sybase.jdbc2.jdbc.
-
Chapter 3 Design-Time Component Reference How to Create and Store Structured Queries in Collage You can create new, blank SQL (.sql) files in Collage, which you can then edit in an external editing tool to define your database queries. If you already have SQL query files that you want to use to retrieve data for the Database Component, you can also upload them to Collage. Collage lists all SQL files in the Project | Data Sources view, under Queries.
-
Database Query Writing the Database Query Component A simple Database Query Component is structured as follows: $node.column("Column name") It includes two sections: 1 The opening tag, which specifies the data source and the query to submit to the data source.
-
Chapter 3 Design-Time Component Reference See the following section for a complete description of all of the properties you can define for the component tag. Database Query Properties Property Value Description classid Always set to "nexus/ components/DBQuery" Points to the component class file inside the nexusComponents.jar file that is needed to implement the component. This property is required. code Always set to the path in Collage to the nexusComponents.
-
Database Query Property Value Description query or queryfile A SQL query (SELECT statement), or the path to a SQL query file (.sql) in Collage Specifies the query to pass to the database. Define this as either of the following: query An inline SQL query statement (SELECT statement), for example: query="SELECT Name, Position, Age FROM Employee WHERE Salary > 4000" queryfile The path to a SQL query file (.sql) in Collage.
-
Chapter 3 Design-Time Component Reference The body section can consist of three sections, an optional prelog, the database records, and an optional prolog: <--HTML--> <--HTML to display the records--> <--HTML--> The Prelog and Prolog Sections The prelog section can optionally be used to define HTML which will precede the display of the query results.
-
Database Query The $node.column("column name") macro is a placeholder for the value of the column identified by the column name attribute. For example, the following database records section will place the values for 4 columns into separate table cells: $node.column("Name") | $node.column("Position") | $node.column("Phone") | $node.
-
Chapter 3 Design-Time Component Reference You can use , in combination with , to define unique formatting for different rows, or sets of rows. For example, $node.column("Name") | $node.column("Position") | $node.column("Name") | $node.column("Position") | $node.column("Name") | $node.
-
Database Query 2 Create the Database Query component, and include a layout property which specifies the path to the layout file to use for details pages. Make sure that the query returns all of the fields which you want to display, either from the component itself, or on the details page. 3 Determine which fields you want to link to details pages, and add tags which use the $node.detailsurl macro to automatically generate the links. Review the detailed instructions in the following sections.
-
Chapter 3 Design-Time Component Reference When you deploy the asset that contains the Database Query component, Collage generates the details page and replaces the $node.detailsurl macro with the name of the details page.
-
ForceReference Complete Database Query Example A complete Database Query component tag may look as follows: Accesses the data source specified in the comp db.nds file, and passes the query defined by the emp_positions.
-
Chapter 3 Design-Time Component Reference To force Collage to deploy assets whose dependencies are too complex to calculate in an incremental deploy context. How to Insert a ForceReference Component Follow the instructions below to insert a ForceReference component by using your HTML editor.
-
Include Asset ForceReference Example The Sample site project, which gets installed with Collage, includes a sample file that uses this component. This file is /WebSite/Component_Demo/ForceReference.html and its location in Collage is shown below: The ForceReference.html file contains this code: If any changes are made to deploy.txt, the ForceReference.
-
Chapter 3 Design-Time Component Reference Display information about or generate links to other assets. You can use the component to automatically find assets in a website that match a specified filename, and generate links to them. This is useful if, for example, you want automatically create links to stylesheets in different website sections without having to copy the stylesheets into every folder in those sections.
-
Include Asset Manually To manually insert the component in your own HTML editor: 1 Open the file to which you want to add the component. 2 Do one of the following: If you want to... Then... Insert the entire content of an asset Add the following to the point in the file where you want to include the asset: PAGE 78
Chapter 3 Design-Time Component Reference complete the body section with a combination of standard HTML, and any combination of the data field macros, including: Field Description $node.assetid Inserts the asset's ID number $node.contribution("field_name") Inserts content from a specified contribution field $node.CreateDate Inserts the date that the asset was created $node.Description Inserts the asset's description $node.FileName Inserts the actual name of the file $node.
-
Include Asset Property Value Description file File name and path Specifies the location and filename of the file to include, relative to the asset in Collage which contains the component. For example, a master page. findfile File name Searches for the file in the current deploy folder, and any deploy folders above it.
-
Chapter 3 Design-Time Component Reference Example 3: Nesting the Include Asset Component in a Select Component You can nest an Include Asset component inside a Select component.
-
MetaTag 3 Select the Serena Collage Design Components palette. 4 Click the Insert Masterpage Body button 5 Accept the default options on the Insert Master Body dialog box. . See "Masterpage Body Properties" on page 81 for more information. 6 Click OK.
-
Chapter 3 Design-Time Component Reference 3 Select the Serena Collage Design Components palette. 4 Click the Insert MetaTag button 5 Manually complete the MetaTag component. See "The MetaTag Body" on page 82 for more information. . Manually Insert the following code in the section of a web page: PAGE 83
MetaTag Property Value Description code Always set to the path in Collage to the nexusComponents.jar file, such as "/System/ Components/ nexusComponents.jar" The archive where the component class file is stored. By default, this is stored in: /root/System/ Components/nexusComponents.jar. You can also set this property to: code="$nexusComponents" which will resolve to the correct path.
-
Chapter 3 Design-Time Component Reference If the value of the release_date metdata field is January 18, 2003, Collage will generate the following tag when the asset is deployed: Navigation Bar The Navigation Bar, or Navbar, component generates buttons that link to other pages in the site, making it easy to navigate around in the site.
-
Navigation Bar Choosing Between the NavMap and Navigation Bar Components The NavMap and Navigation Bar components provide similar navigation features for your web pages; each can be used to automatically generate navigation menus based on site hierarchy.
-
Chapter 3 Design-Time Component Reference About Image Buttons When an image is used as a navigation button, the Navigation Bar component can flatten text onto the image.
-
Navigation Bar 4 Click the Insert Navigation Bar button appears. . The Insert Navigation Bar dialog box 5 Choose whether the Button Type will be Text or Image. 6 Choose whether the buttons will Display vertically or horizontally. 7 If you are creating image type buttons, enter or browse to select the Active Button and Inactive Button images. 8 Choose whether the Navigation will be based on the Site Structure, or Deploy Folders.
-
Chapter 3 Design-Time Component Reference nexusComponents.jar. You can also set this property to: code="$nexusComponents" which will resolve to the correct path. By default, the Navigation Bar component uses the current site structure to which the page belongs to define its links.
-
Navigation Bar 3 Do one of the following to define the inactive link button. This definition will be reused for all inactive buttons. If you are using image type buttons, enter: Specify an image name, the path to the image file, and any other img attributes. Optionally, if you want Collage to flatten text on top of the image button, add a text attribute, such as text="Links".
-
Chapter 3 Design-Time Component Reference Site Structure Node Options Option Description Children Includes all children of the current page. Current Includes the current page. CurrentLevel Includes all pages at the same level as the current page. FirstLevel Includes all pages of the level immediately under the root of the current site. Parent Includes the parent page of the current page. ParentLevel Includes all pages at the level above the current page.
-
Navigation Bar macro to generate text for buttons based on the name of the assets they are linking to. Format date fields. All macros have the following format: $Type.Fieldname For example: $node.FileName Optional parameter(s) can be defined for date fields. For detailed information on all of the data field macros, see "Data Field Macro Reference" on page 23.
-
Chapter 3 Design-Time Component Reference Property Value Description orderbycode Letter code for a specific order in which to display navigation buttons. The order in which to locate and display navigation buttons, for deploy folder based navigation bars. For example, orderbycode="F" Sorts the buttons by filename. Use an upper case letter code, such as "T," to display the buttons in ascending order. Use a lower case letter code, such as "t," to display the buttons in descending order.
-
Navigation Bar Property Value Description orderonmetadata Names of metadata fields which can be used to order the navigation buttons Defines metadata fields which the orderbycode property can use to order the navigation buttons, for deploy folder based navigation bars.
-
Chapter 3 Design-Time Component Reference Site Structure Based Navigation Bar In this example, the Navigation Bar component will be added to Home.html, from the simple section of a site structure pictured below. The following component code is added to Home.Html: PAGE 95
NavMap select property, which limits the navigation buttons to only those assets to which the indexfile metadata field is assigned and set to Yes.
-
Chapter 3 Design-Time Component Reference the site structure. In this way, you can preserve the site's information hierarchy in your navigation menus. Site structure levels are defined as follows: Level 1 Level 2 To insert the level number, the component must include the $node.level macro. When you preview or deploy the component, Collage replaces $node.level with the actual level number.
-
NavMap example, you might use the Navigation Bar component to generate a sub-menu of all pages in one area, for example product details pages that all pertain to products of a common type, and which are grouped together in your site structure. For detailed information on the Navigation Bar component, see "Navigation Bar" on page 84. The NavMap component returns information about all nodes in a site structure, regardless of their relationship to the page that contains the component.
-
Chapter 3 Design-Time Component Reference Property Value Description code Path in Collage to the nexusComponents.jar file, such as "/System/ Components/ nexusComponents.jar" The archive where the component class file is stored. By default, this is stored in: /root/System/Components/ nexusComponents.jar. You can also set this property to: code="$nexusComponents" which will resolve to the correct path.
-
NavMap The following component provides a basic example of how you might do this, using a very simple JavaScript: If the variables node and i are defined in the section of a page, the values stored in these variables are then available to any JavaScript function on the page.
-
Chapter 3 Design-Time Component Reference The previous page in the query results The first and last pages in the query results The Query Navigator component allows you to assign unique images and text to each button in the navigation bar. For example, you might create buttons with the text "Next," "Previous," and "Top." How the Query Navigator Component Works To generate the links, you must place the component on each of the details pages that the AssetQuery links to.
-
Query Navigator What Buttons Can You Define? You can define the following unique buttons for the Query Navigator component, and you can order them in any way that you like to build the navigation bar: Button Description First active Links to the first page in the AssetQuery result set; displays when the link is active First inactive Links to the first page in the AssetQuery result set; displays when the link is inactive Last active Links to the last page in the AssetQuery result set; displays when t
-
Chapter 3 Design-Time Component Reference 4 Click the Insert Query Navigator button component dialog box appears . The Insert Query Navigator 5 From the Link list, choose whether the buttons will be Text or Image based. 6 Complete the Insert Query Navigator dialog box. See "About the Query Navigator Buttons" on page 102. Manually Construct the component tag as follows: PAGE 105
Query Navigator This example defines a button for an active link to the next page in the AssetQuery result set. The tag generates the link to the correct page. The button will be a simple text link ("Next"). TIP The $node.url macro generates a relative URL. You can also generate an absolute URL to the asset by instead using the $node.absurl. Image buttons simply include an image reference in the tag, for example: PAGE 106
Chapter 3 Design-Time Component Reference Button Code Next inactive Image reference or button text Previous active Image reference or button text Previous inactive PAGE 107
Select Select The Select component can display different content based on specific criteria. You can use the Select component to define variable content based on conditions such as metadata values, or asset property values (such as filename and asset name).
-
Chapter 3 Design-Time Component Reference The Select Component Structure The Select component includes two sections: The component tag, which defines the property or metadata value which will be used to determine which content snippet to display The body, which defines the unique content snippets for the different property or metadata values Component Tag The opening tag includes a select property, which identifies the asset property or metadata field the values of which will be used to determine wh
-
Select Value Description $type.Description The description of: The asset that contains the component ($node.Description) The deploy map that was used to publish the asset ($publishmap.Description) Or the deploy folder that contains the asset ($parent.Desription) $node.MimeType The MIME-type of the asset that contains the component $node.Size The filesize of the asset that contains the component $type.CreateDate The creation date of: $type.
-
Chapter 3 Design-Time Component Reference Web Team defines content to insert when the value is set to anything other than Ken, Sara, or Alice. Displaying Text on Images When an image is used inside the Select component body, the component can flatten text onto the image. You can do this by adding a special text parameter to the tag, as in the example below: PAGE 111
Select 5 Complete the Insert Select Component dialog box. See "Select Properties" on page 111 for more information. 6 Click OK. Manually To insert the Select component manually: 1 Open the file to which you want to add the component. 2 Add the following to the point in the file where you want the content snippets to appear: PAGE 112
Chapter 3 Design-Time Component Reference Property Value Description select Data field macro Specifies an asset property or metadata field, the value of which will determine which content snippet to select. Possible values include: $node.FileName $node.name $node.assetid $node.description $node.MimeType $node.Size $node.CreateDate $node.
-
Select illustrated above. When you deploy the site, your choice of deploy map automatically determines which version will actually be output to the web server. Select Example 2: Displaying Unique Content at Preview Time Collage includes a project setting which allows you to retrieve the metadata value for a specified deploy map when you preview an asset.
-
Chapter 3 Design-Time Component Reference When you preview the asset, it will display the following text: This page was created by Alex Mar on 04.19.02. It was last modified on 05.22.02. When the page is actually deployed using another deploy map, for which the Preview field is set to "No," no content will display. This is because the tag is empty. WARFiler The WARFiler component automates the creation of Web ARchive (WAR) files for deployment.
-
WARFiler 5 Set up and start deployment. 6 Schedule and run deployment. 1: Create the Deploy Folder Structure You must store all of your web application files in a specific set of root deploy folders in Collage. Collage looks for specific types of files in these root deploy folders, and correctly generates the WAR file based on these files.
-
Chapter 3 Design-Time Component Reference into the WAR file. If you want to deploy any additional files, such as a script or batch file that the Deploy Agent will run on the destination server, you must put the files in this folder. For example, you might want to deploy a script or batch file to restart the destination server.
-
WARFiler 9 Click OK again, and then click Close. 10 Click the Update Metadata button, and then click OK. 11 For any JSP files that will be pre-compiled as part of the deployment process, make sure that the Precompile metadata field is set to Yes. To verify that the metadata field is assigned, select the JSP file and click the Properties button. On the Properties tab, select Metadata.
-
Chapter 3 Design-Time Component Reference To upload application files: 1 In Collage, go to the Content | Deploy Folders view. 2 Select the following root deploy folders and click the Upload button to upload the appropriate files to each: a /Code • Upload all servlet and class files to this deploy folder. • Upload Java class files to the /WEB-INF/classes subfolder. • Upload JAR files to the /WEB-INF/lib subfolder. b /Configuration Upload all configuration and properties files, including the web.
-
WARFiler Field Description Absolute path of JDK installed Location of the JDK installation. This requires that the JDK be installed on the Collage server. Classpath for compiling JSP files Classpath for the JSP compiler. This requires that the application server's JSP compiler class files/JAR files are installed to the Collage Server. IMPORTANT! These classpaths cannot contain spaces, and the total length for this field cannot exceed 254 characters.
-
Chapter 3 Design-Time Component Reference 6: Schedule and Run Deployment Do either of the following to start a deployment activity that uses the deploy map you created: From the Deploy | Activities view, start a deployment activity immediately. From the Deploy | Schedule view, schedule a deployment activity. When the Enable Tomcat WARFiler property is set to True and you run a deployment activity, Collage does the following: 120 Runs the JSPC and precompiles JSP files.
-
Chapter 4 Layout Contribution Component Reference About Layout Contribution Components 122 Layout Contribution Field 124 Layout Contribution Metadata 127 Layout Contribution Property 130 Components User's Guide 121
-
Chapter 4 Layout Contribution Component Reference About Layout Contribution Components Layout contribution components work together with the content contribution feature in Serena Collage. They enable you to set up layout files for contribution documents, or to define alternate layouts for other HTML assets. Layout files are any HTML file or server page that defines look and feel for contribution document in Collage, or that defines alternate formatting for other HTML assets.
-
About Layout Contribution Components feel specifically for the contributed content, including placement on the page and font definitions. Heading Text side bar Body text Layout File Master Page Heading text Body text Side bar Serena Unveils Content Contribution Serena today announced the latest version of Collage, which includes new Content Contribution features.
-
Chapter 4 Layout Contribution Component Reference What are the Layout Contribution Components? Collage includes the following layout contribution components: Component Description For details, see...
-
Layout Contribution Field can also be achieved by applying a master page which contains the template elements to the layout file, which contains the layout for the content fields.
-
Chapter 4 Layout Contribution Component Reference Or, click the Check Out button then open the file from within your HTML editor. In either case, the file is copied to your workfile directory. NOTE You can verify and modify your workfile directory from the Preferences dialog box. Click the Preferences button from the program bar to the display the Preferences dialog box. 3 Do one of the following: If you want to... Then...
-
Layout Contribution Metadata Layout Contribution Field Example The code example below includes a Layout Contribution Field component for a field called Title.
-
Chapter 4 Layout Contribution Component Reference How the Layout Contribution Metadata Component Works The Layout Contribution Metadata tag uses the following syntax: The metadata field defines the name of the metadata field to display. The format field can be used to add any special formatting, for example for date fields.
-
Layout Contribution Metadata 3 Do one of the following: If you want to... Then... Insert the component using the Collage component integration to Macromedia Dreamweaver a Open the file in Dreamweaver. b Select Window | Objects to display the Objects window. c From the Objects window, display the Serena Collage Design Components palette. d Place the cursor where you want to insert the component. e Click the Layout Metadata-field Component button .
-
Chapter 4 Layout Contribution Component Reference Layout Contribution Property You can add the Layout Contribution Property component to layout files to insert the value of specific asset properties into contribution documents, or to insert the entire content of an HTML asset into a layout file. When a contribution document that uses a layout file that includes the Layout Contribution Property component is previewed, edited, or deployed, Collage replaces the component with the property value.
-
Layout Contribution Property Property Description masterpageassetid If a master page is assigned to the asset, displays the asset ID number for the master page. approveddate If the asset has been approved, displays the date when the asset was approved. You can include an additional parameter to format the date. For example: Will generate a date in the following format: 2001.May.
-
Chapter 4 Layout Contribution Component Reference Via the component integration to Macromedia Dreamweaver To add a Layout Contribution Property component to a layout file: 1 Navigate to the Project | Contribution Setup view. 2 Locate and select the contribution asset type. Details about the asset definition file and layout file appear in the right pane. 3 Select the layout file.
-
Layout Contribution Property 5 Do one of the following: If you want to... Then... Insert the component using the Collage component integration to Macromedia Dreamweaver a Install the component integration to Collage. See "Setting Up Component Integration with Dreamweaver" on page 16. b Open the file in Dreamweaver. c Select Window | Objects to display the Objects window. d From the Objects window, display the Serena Collage Design Components palette.
-
Chapter 4 Layout Contribution Component Reference 134 Serena® Collage® 5.1.
-
Chapter 5 Advanced Examples About the Examples 136 Creating Printer-Friendly Contribution Documents 136 Creating Printer-Friendly HTML Documents 137 Components User's Guide 135
-
Chapter 5 Advanced Examples About the Examples This chapter provides examples of components that can be used together. You can adapt these examples to your own projects. Creating Printer-Friendly Contribution Documents This example shows you how to create a printer-friendly version of a contribution document that does not include things such as navigation buttons, ads, and so on from the main web page.
-
Creating Printer-Friendly HTML Documents 11 The select property checks the PrintVersion metadata Edit the Press Release_layout.html file and add the following code: PAGE 138
Chapter 5 Advanced Examples To create a printer-friendly HTML document: 1 The layout property points to the alternate layout file Add the following AssetQuery code into the masterpage where you want the "Printer Version" link to be placed: PAGE 139
Index Symbols $node.approvedby 26 $node.approveddate 26 $node.approvedversion 26 $node.assetid 26 $node.assettype 26 $node.checkouttime 26 $node.children 99 $node.contribution 24, 29 $node.CreateDate 27 $node.creator 26 $node.Description 27 $node.detailsurl 29 $node.expiredate 27 $node.filedate 27 $node.FileName 27 $node.filename 24 $node.imgheight 27 $node.imgwidth 27 $node.latestversion 27 $node.level 98 $node.masterpageassetid 28 $node.meta 28 $node.MimeType 28 $node.name 28, 100 $node.path 28 $node.
-
Index procedures 18 requirements 16 using with master pages 12 writing 17 Conditional component about 57 properties 59 contribution documents laying out 124 metadata 127 properties 130 creation date, asset 27 creation date, contribution document 130 creator name, asset 27 creator, contribution document 131 current timestamp 36 D data field macros $node.approvedate 26 $node.approvedby 26 $node.assetid 26 $node.assettype 26 $node.checkoutname 26 $node.checkouttime 26 $node.children 99 $node.
-
Index H horizontal navigation bar 91 HTML authoring environment 16 knowledge requirement 16 layout files 122 I image banner, generating 54 image height asset thumbnail 27 contribution document 131 image width asset thumbnail 27 contribution document 131 images, using in navigation bars 86 Include Asset component about 75 examples 79 inserting components 17 is null 36 J java components, see components JDBC databases, querying 62 K knowledge requirements 16 L latest version, displaying 27 layout files, D
-
Index O SybDriver 63 Object Palette, Macromedia DreamWeaver 17 orderbycode 41 OrderOnMetadata property 42 OS redirection 57 OS-specific content 58 overview of components 10 P parameters for Conditional 58 path asset 28 contribution document 131 preferences 126, 128, 132 properties, contribution documents 130 T technical requirements for developing components 16 templates creating 80 using with components 12 testing components 18 text banner, generating 54 type, MIME 28 U user, ordering AssetQuery resu
| | |