pdflayout special block name

Modified on Wed, Feb 19, 2020 at 12:13 PM

This block controls the layout of the fields. It has no effect on the PDF output file. To use it create a block with this specific name pdflayout

This command is available to Bootstrap Blocks / Default type ONLY.

The html code for the layout is to be inserted as the default value (any type of block can be used). A file path is also accepted.

Pdflayout block can also be used to enter class names for the div containing the label and the div containing the control. By default, this is col-sm-12^col-sm-12. The ^ is the separator, on the left put the label div class names and on the right the control div class names. For example:

col-sm-4 text-right bg-danger^col-sm-8

The above will put the label to the right of the control, right aligned with a red background.

Normally, the pdflayout contains HTML code with special tags: Example:

<table class="table table-condensed" >
<tr>
<td style="width: 30%;">Name</td>
<td>{Name}</td>
</tr>
<tr>
<td>Title</td>
<td>{Title}</td>
</tr>
 </table>

The first ‘Name’ is the label and can be anything, whereas {Name} is the block name (exactly as defined in the document) surrounded by curly braces.

Duplicate Block Names are not allowed; missing fields will be inserted on the document without proper formatting. For better results please add all visible blocks.

 

Once the file is uploaded, the template can be accessed by going to Edit Product/Options/Bootstrap Fields Layout. Check off ‘Use Layout Template’ to view the layout code.

You can use the displayed editor to design the layout. Field names and labels can be inserted by a click of a button. Two preset designs are available that can be inserted automatically: Auto Divs and Auto Table.

The Fields Layout page can also be accessed by clicking the Template button in Custom Commands page. The button is red when a layout is used otherwise the default colour.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article