Custom Web Publishing Guide

Table Of Contents
132 Custom Web Publishing Guide
CDML tag name: Image
Tag is replaced with a container URL reference to the image in the specified field
CDML syntax: [FMP-Image: FieldName]
XSLT-CWP conversion:
1 when current context is a record: <xsl:call-template name="get-image"><xsl:with-param
name="fieldname" select="'fieldname'"/><xsl:with-param name="recid" select="$record/@record-id"/></
xsl:call-template>
1 otherwise: <xsl:call-template name="get-image"><xsl:with-param name="fieldname"
select="'fieldname'"/><xsl:with-param name="recid" select="$default-record/@record-id"/></xsl:call-
template>
CDML tag name: Include
Tag is replaced with the contents of another file, usually an HTML format file
CDML syntax: [FMP-Include: FileName]
XSLT-CWP conversion:
1 <!-- CDML Converter WARNING: The file “FileName” has now been incorporated inline into this
document and the reference to the original file has been dropped; the original file may no longer be
needed.
-->converted contents of the file
1 if inside an SGML tag/attribute, <!-- CDML Converter ERROR: [FMP-Include] not in a valid location -->
Conversion example
Original CDML: <img src="[FMP-Image: pictures]">
Converted XSLT-
CWP:
<img>
<xsl:attribute name="src">
<xsl:call-template name="get-image">
<xsl:with-param name="fieldname" select="'pictures'"/>
<xsl:with-param name="recid" select="$default-record/@record-id"/>
</xsl:call-template>
</xsl:attribute>
</img>
Converted Result: <img src="/fmi/xsl/cnt/data.jpg?-db=products&-lay=product_list&-recid=2&-field=pictures"/>
Conversion example
Original CDML: [FMP-Include: requirefield.htm]
Converted
XSLT-CWP:
<!-- CDML Converter WARNING: The file "requirefield.htm" has now been incorporated inline into this
document and the reference to the original file has been dropped; the original file may no longer be
needed. -->converted contents of the file
Converted
Result:
converted contents of the file