There are two ways of looping through fragment code. Both examples shown below use the following basic structure:
<Fragment Name="frgLoopTest" OverrideMe="" UniqueVal=""> <!-- Do something useful --> </Fragment>
In both cases below, the fragment frgLoopTest will be expanded twice, first with the parameters OverrideMe="ThankYou" and UniqueVal="1" and then second with OverrideMe="Please" (the default if not specified as a loop property) and UniqueVal="2"
<FragmentInclude Name="frgLoopTest" OverrideMe="Please" > <FragmentLoop> <Property><Properties OverrideMe="ThankYou" UniqueVal="1" /></Property> <Property><Properties UniqueVal="2" /></Property> </FragmentLoop> </FragmentInclude>
<Fragment Name="MainFragment" LoopParams="#REQ#" > <FragmentInclude Name="frgLoopTest" OverrideMe="Please" > <FragmentLoop Value="{LoopParams}" /> </FragmentInclude> </Fragment>
Call this with:
<FragmentInclude Name="MainFragment"> <Property Name="LoopParams"> <Property> <Properties OverrideMe="ThankYou" UniqueVal="1" /> </Property> <Property> <Properties UniqueVal="2" /> </Property> </Property> </FragmentInclude>