Site Studio wcm:dataFile Tag Site Studio wcm:dynamicConversion Tag

Site Studio Tag Library and Helper Methods 6-3 ■ initFromPath: Set to true to initialize the context from the current HttpServletRequest path the url parameter is then ignored. Example Initialize a new context to the primary page of the about section for site ID mysite: wcm:context siteID=mysite url=aboutindex.html Reset the current SiteContext to a new URL, without specifying the site ID: wcm:context url=index.html

6.1.3 Site Studio wcm:dataFile Tag

The Data File tag loads content from the content server and parses it into a DataFile object. The object is then exposed as a variable to be used by the Expression Language EL to access the individual components of the data file. Typically the wcm:dataFile tag is used on a region template, to load the assigned DataFile for display. The DataFile object implements the Map interface, allowing access to all members by the element name. There are two types of elements that can be retrieved: ■ TextElement: The text content. ■ ListElement: The static list content. The ListElement implements the List interface, which each member of the list a map of TextElements. Parameters ■ var: The variable name of the resulting DataFile object. Required. ■ dataFile: The content ID of the data file. If not specified, it uses the currently assigned ID for the current placeholder if called from within a wcm:placeholder tag. Optional. Example Assume the data file, with a content ID of AWARDS has the following shape: ?xml version=1.0 encoding=UTF-8? root xmlns=http:www.stellent.comwcm-datans8.0.0 version=8.0.0.0 element name=titleAwardswcm:element list name=list row element name=name2007 Outstanding Organization Awardelement row row element name=name2006 Top 50 Companyelement row list root From a region template, load the assigned data file: wcm:dataFile var=dataFile Alternatively, load the data file by specifying the content ID: wcm:dataFile var=dataFile contentID= Model the data into some HTML: h2{title}h2 6-4 Oracle Fusion Middleware Developers Guide for Site Studio for External Applications ul c:forEach var=row items={dataFile.list} li{row.name}li c:forEach ul

6.1.4 Site Studio wcm:dynamicConversion Tag

The Dynamic Conversion tag is used to specify the conversion rule to use when creating a dynamic conversion of a native document. Parameter ■ rule: The name of the dynamic conversion rule as defined in the ConversionsDefinition file. Required. From View Property Inspector Rule Edit you can select a rule for the dynamic conversion tag. If a rule is not selected, the default rule is used. ■ page: The page number to display. Optional. ■ var: Variable to assign the output of the dynamic conversion. If not specified, the output of the conversion will be written to the page directly. Optional. ■ dataFile: The dDocName content ID of the item to convert. If not specified, the data file assigned to the current placeholder will be used. Optional. Example Convert the current data file using the rule ruleName: wcm:dynamicConversion rule=ruleName Convert the data file MY_WORD_DOC using the rule ruleName: wcm:dynamiConversion dataFile=MY_WORD_DOC rule=ruleName

6.1.5 Site Studio wcm:dynamicList Tag