Custom Web Publishing Guide

Table Of Contents
138 Custom Web Publishing Guide
CDML tag name: Link to Record ID
Tag is replaced with a URL to a specific record in a database. The link that is generated includes all the search
and sort criteria that was used to generate the page this tag was on. The Layout parameter is optional.
CDML syntax: [FMP-LinkRecID: Format=FileName, Layout=LayoutName]
XSLT-CWP conversion:
1 <xsl:call-template name="get-link-rec-id"><xsl:with-param name="rec-id" select="@record-id"/
><xsl:with-param name="stylesheet" select="'/FileName.xsl'"/></xsl:call-template>
1 if followed a '-format' parameter: the 'stylesheet' parameter is passed to the 'get-link-rec-id' template
1 if followed a '-lay' parameter: the 'layout' parameter is passed to the 'get-link-rec-id' template
1 if not inside an SGML attribute: <!-- CDML Converter ERROR: [FMP-LinkRecID] not in a valid
location -->
CDML tag name: Log
Tag is replaced with the text specified as the parameter and written as user log messages in the application log
file. See
“Using the Web Publishing Engine application log” on page 73.
CDML syntax: [FMP-Log: someText]
XSLT-CWP conversion:
1 <xsl:message>someText</xsl:message>
1 if inside an SGML tag/attribute: <!-- CDML Converter ERROR: [FMP-Log] not in a valid location -->
Conversion example
Original CDML: <a href="[FMP-LinkRecID: format=FormatFile.htm, layout=detail]">More detail</a>
Converted
XSLT-CWP:
<a>
<xsl:attribute name="href">
<xsl:call-template name="get-link-rec-id">
<xsl:with-param name="rec-id" select="$record/@record-id"/>
<xsl:with-param name="stylesheet" select="'FormatFile.xsl'"/>
<xsl:with-param name="layout" select="'detail'"/>
</xsl:call-template>
</xsl:attribute>More Detail</a>
Converted
Result:
<a href="/fmi/xsl/FormatFile.xsl?-db=products&-grammar=fmresultset&-lay=detail&-recid=3&-
find=">More detail</a>
Conversion example
Original CDML: Log code is here: [FMP-Log: the search page was accessed]
Converted XSLT-CWP: Log code is here: <xsl:message>the search page was accessed</xsl:message>
Converted Result: Log code is here:
(The text the search page was accessed is written to the application log if user logging is
enabled.)