Custom Web Publishing Guide

Table Of Contents
120 Custom Web Publishing Guide
CDML tag name: Current Portal Number
Tag is replaced with the row number of the current portal being processed. This is always found within a
[FMP-Portal] loop.
CDML syntax: [FMP-CurrentPortalRowNumber]
XSLT-CWP conversion:
1 when inside SGML element attribute value: {position()}
1 otherwise: <xsl:value-of select="position()"/>
1 when outside of a [FMP-Portal] loop: <!-- CDML Converter ERROR: [FMP-CurrentPortalRowNumber]
outside of [FMP-Portal] -->
Converted XSLT-CWP: <form action="/fmi/xsl/results.xsl" method="POST">
<input type="HIDDEN" name="-DB" value="contacts"></input>
<input type="HIDDEN" name="-grammar" value="fmresultset"></input>
<input type="HIDDEN" name="-RecID" value="{@record-id}"></input>
<input type="HIDDEN" name="-ModID" value="{@mod-id}"></input>
<input type="TEXT" name="Country"></input>
<input type="SUBMIT" name="-Edit" value="Edit This Record"></input>
</form>
Converted Result: <form action="/fmi/xsl/results.xsl" method="POST">
<input type="HIDDEN" name="-DB" value="contacts">
<input type="HIDDEN" name="-grammar" value="fmresultset">
<input type="HIDDEN" name="-RecID" value="1032">
<input type="HIDDEN" name="-ModID" value="3">
<input type="TEXT" name="Country">
<input type="SUBMIT" name="-Edit" value="Edit This Record">
</form>
Conversion example
Original CDML: [FMP-Portal: lineitems]
[FMP-CurrentPortalRowNumber]: [FMP-Field: lineitems::name]<br>
[/FMP-Portal]
Converted XSLT-CWP: <xsl:for-each select="fmrs:relatedset[@table='lineitems']/fmrs:record">
<xsl:value-of select="position()"/>: <xsl:value-of select="fmrs:field[@name = 'name']" />
<br />
</xsl:for-each>
Converted Result: 1: Red<br>
Conversion example