Dynamic template structure

0
stand posted this 03 September 2013

Hi,

I just downloaded the product and have been able to create several tests. Now I would like to know if it is possible to create a template with dynamic structure. For example, my template has several sections/regions and I would like one of them to be removed if a condition is met. If a property of a data source object has value XY then the section should remain in the generated document otherwise it should be removed. Is this possible with docentric toolkit?

thanks, stan

Last edited 03 October 2013

2 Posts
2 Points
2 Comments
Order By: Standard | Newest | Votes
0
stand posted this 05 September 2013

Excellent, that's just what I needed!

Last edited 03 October 2013

2 Posts
2 Points
0
jles posted this 03 September 2013

Hi Stan,

This is easily achieved by using the IF element. Just wrap the dynamic section into an IF element and bind the element to the property that returns the evaluation of the condition. Note that the result should only be a boolean value. In case your data source object doesn't have the property that returns a boolean result than you have 2 options:
- Add such a calculated property to your data source object type.
- Name the IF element and in the code behind hook to Element.Initialize event. In the event handler calculate and set the result for the IF element.

I hope this helps.

Cheers, Jure

Last edited 03 October 2013

155 Posts
295 Points

Our 228723 members have posted 344 times in 102 discussions