Pass external parameters to template

Top Previous Topic Next Topic  Print this topic

Here is an example of how to pass external parameters to template.

You can do this using the command line or by using XF Ultrascale.

 

Open XF Designer 2011 and create a new .xfd document. Assign a .xml data source. Go to Review tab and select Edit parameter from Template group. This will open the following dialog box:

 

parameters2

 

First must be added the parameter to the template. That is done by clicking the Add button. The next dialog is shown, where you have to enter the Name of the parameter and the Default Value.

 

passparameter

 

passparameter2

 

After adding the parameter, it can be found in XPath dialog under Parameters selection:

 

passparameter3

 

For using the parameter, a Conditional Section is inserted. From the Insert tab choose Conditional Section in the Dynamic Content group. The next dialog will appear:

 

passparameter4

 

Click Add button and then edit the expression. From the Parameters list choose the parameter created:

 

passparameter5

 

Customize the selection for the condition and customize the fallback section.

 

1. Passing an external parameter from command line

 

We will use Render.exe application to process the template.

 

Open a new command window in C:\Program Files\Ecrion\XF Ultrascale 2011\Bin folder.

Remember to first make sure that you have write access on C:\ !!!

Type the following line: