Portlet Factory, Version 6.1.2
Adding elements to a template
Sometimes you will want to use additional builders which will operate on HTML generated by the Page Automation code. For example, you might want to include an Add Row button for a table, that enables the end-user to add a row. You would like to include an extra row at the bottom of the table which contains a named <span> tag to which you can attach your Button builder. Furthermore, the table template that you are using might be used elsewhere on the page, so you want to be able to make sure your Button builder targets exactly the right <span> tag.
The way to accomplish this is to create an XML node inside the construct that has a name that starts with an underscore. For example, you might make an element <span name="_AddButton">
The system will rename this element when it uses the construct, by pre-pending the name of the container or field that was being rendered when it chose this construct. In this example, if the above span appeared inside the Table construct and was used to create the PhoneNumber table, that node would be changed to the following span on the page, making it perfect for attaching a Button builder. <span name="PhoneNumber_AddButton">
Parent topic: Page Automation HTML templates
Library | Support |