OpenTBS odp - automatic slide adding and sub-blocks

351 Views Asked by At

i have an array like this:

$entryArray = array();
    $i = 0;
    foreach ($entities as $value){
        $entryArray[$i]['modul'] = $value->getModul()->getName();
        $entryArray[$i]['matches']['date'] = $value->getDate();
        $entryArray[$i]['matches']['tonality'] = $value->getTonality()->getName();
        $entryArray[$i]['matches']['author'] = $value->getAccountname();
        $entryArray[$i]['matches']['content'] = $value->getContent();
        $entryArray[$i]['matches']['follower'] = $value->getFollower();
        $entryArray[$i]['matches']['link'] = $value->getlink();
    }

It works fine without the 'matches' and without the sub-attribut. Here is my template: enter image description here

I want categorize the tables with moduls:

modul1 table1

modul2 table2

and i want a new slide after the end of slide is reached.

Thank you very much for every one how can help me on this ;)

1

There are 1 best solutions below

0
On

It is not possible to split a table over several a slides with a ODP Presentation.

Then I can see tow problems with your data and your template :

Assuming your template is merged with the PHP array $entryArray, the first step to do is to give a convenient structure for the main block and sub-block.

The structure of $entryArray should be like this :

$entryArray = array(
   0 => array(
      'modul' => "Module name 1",
      'matches' => array(
          0 => array('date' => "...", 'tonality' => "...", 'author' => "...",  ...),
          1 => array('date' => "...", 'tonality' => "...", 'author' => "...",  ...),
          2 => array('date' => "...", 'tonality' => "...", 'author' => "...",  ...),
          ...
      ),
   ),
   1 => array(
      'modul' => "Module name 2",
      'matches' => array(
          0 => array('date' => "...", 'tonality' => "...", 'author' => "...",  ...),
          1 => array('date' => "...", 'tonality' => "...", 'author' => "...",  ...),
          2 => array('date' => "...", 'tonality' => "...", 'author' => "...",  ...),
          ...
      ),
   ),
   ...
);

Then the second thing is that the main block named "table-block" is not correctly defined. Since the parameter "block" is not defined, the parameter "sub1" is not taken in account because it is a block parameter and the block is not defined here.

The main block could be define like this :

[table-block.modul;block=tbs:slide;sub1=matches]

Note that tbs:slide works with an ODP presentation but not with an PPTX presentation.