Scenario
I am trying to create more than one page in OpenTBS (.docx file) from a PHP array with each array element corresponding to a page of data.
Question
How can I insert new pages for every data element?
Any help would be appreciated.
PHP Code
foreach($actionItems as $actionItem)
{
array_push($data, array(
'ActionItemID' => $actionItemID,
'ActionItemTitle' => $actionItemTitle,
'Assignor' => $assignorLastFirst,
'Criticality' => $criticality,
'Owner' => $ownerLastFirst,
'AltOwner' => $altOwnerLastFirst,
'AssignedDate' => $assignedDate,
'DueDate' => $originalDueDate,
'ECD' => $ecd,
'ClosureDate' => $closureDate,
'Team' => $team,
'Department' => $department,
'Source' => $source,
'Project_Phase' =>$projectPhase,
'ActionItemStatement' => $actionItemStatement,
'ClosureCriteria' => $closureCriteria,
'Notes' => $notes,
'ClosureStatement' => $closureStatement
));
}
$TBS->MergeBlock('a', $data);
Template Screenshot
The solution is explained in the DOCX template of the OpenTBS demo provided in the OpenTBS package :
tbs:page
. This alias is given by OpenTBS and it helps to found the bounds of the page (or pages) according to the page-break defined in the paragraph propertiesExample: [a.ActionItemID;block=tbs:page]