Templates OpenTBS odp-自动幻灯片添加和子块
我有这样一个数组:Templates OpenTBS odp-自动幻灯片添加和子块,templates,add,slide,opentbs,odp,Templates,Add,Slide,Opentbs,Odp,我有这样一个数组: $entryArray = array(); $i = 0; foreach ($entities as $value){ $entryArray[$i]['modul'] = $value->getModul()->getName(); $entryArray[$i]['matches']['date'] = $value->getDate(); $entryArray[$i]['matche
$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();
}
它在没有“匹配项”和子属性的情况下运行良好。
这是我的模板:
我想用模块对表进行分类:
模块1
表1
模块2
表2
在幻灯片结束后,我想要一张新的幻灯片
非常感谢您的每一位,您如何能在这方面帮助我;) 使用ODP演示文稿无法将一张表拆分为多张幻灯片 然后我可以看到您的数据和模板存在两个问题: 假设您的模板与PHP数组$entryArray合并,那么要做的第一步是为主块和子块提供一个方便的结构
$entryArray
的结构应如下所示:
$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' => "...", ...),
...
),
),
...
);
[table-block.modul;block=tbs:slide;sub1=matches]
第二件事是名为“table block”的主块没有正确定义。由于未定义参数“block”,因此不考虑参数“sub1”,因为它是块参数,且此处未定义块
主块的定义如下:
$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' => "...", ...),
...
),
),
...
);
[table-block.modul;block=tbs:slide;sub1=matches]
请注意,
tbs:slide
适用于ODP演示文稿,但不适用于PPTX演示文稿。您的模板建议您合并几个模块,每个模块都有几个匹配的。虽然PHP代码片段表明您只有一组模块,但每个模块只有一个匹配的。根据您的模板,模块的数据结构应该类似于$module=array('name'=>'…','matches'=>array(…)
好的,谢谢:)知道如何在10个入口后拆分幻灯片吗?我想在幻灯片到达幻灯片末尾后添加一张幻灯片。