Add dedicated single page for team plugin
This commit is contained in:
@@ -70,6 +70,29 @@ class TeamController extends ActionController
|
|||||||
if ($member === null) {
|
if ($member === null) {
|
||||||
$this->redirect('list');
|
$this->redirect('list');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->view->assign('member', $member);
|
$this->view->assign('member', $member);
|
||||||
|
$this->view->assign('data', $this->configurationManager->getContentObject()->data);
|
||||||
|
$this->view->assign('header', $this->coalesceHeader($member));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Teammember $member
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function coalesceHeader(Teammember $member)
|
||||||
|
{
|
||||||
|
$data = $this->configurationManager->getContentObject()->data;
|
||||||
|
if (isset($data['header']) && $data['header'] !== '') {
|
||||||
|
return $data['header'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$firstCategory = current($member->getCategories()->toArray());
|
||||||
|
if ($firstCategory !== null) {
|
||||||
|
return $firstCategory->getTitle();
|
||||||
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ class Teammember extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
|
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
|
||||||
*/
|
*/
|
||||||
public function getCategories()
|
public function getCategories()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,28 @@
|
|||||||
</TCEforms>
|
</TCEforms>
|
||||||
<type>array</type>
|
<type>array</type>
|
||||||
<el>
|
<el>
|
||||||
|
<settings.teamListPID>
|
||||||
|
<TCEforms>
|
||||||
|
<exclude>0</exclude>
|
||||||
|
<label>Listenansicht PID</label>
|
||||||
|
<config>
|
||||||
|
<type>input</type>
|
||||||
|
<size>20</size>
|
||||||
|
<eval>required</eval>
|
||||||
|
</config>
|
||||||
|
</TCEforms>
|
||||||
|
</settings.teamListPID>
|
||||||
|
<settings.teamShowPID>
|
||||||
|
<TCEforms>
|
||||||
|
<exclude>0</exclude>
|
||||||
|
<label>Einzelansicht PID</label>
|
||||||
|
<config>
|
||||||
|
<type>input</type>
|
||||||
|
<size>20</size>
|
||||||
|
<eval>required</eval>
|
||||||
|
</config>
|
||||||
|
</TCEforms>
|
||||||
|
</settings.teamShowPID>
|
||||||
<settings.teamCategories>
|
<settings.teamCategories>
|
||||||
<TCEforms>
|
<TCEforms>
|
||||||
<exclude>0</exclude>
|
<exclude>0</exclude>
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ class Tcemain
|
|||||||
/**
|
/**
|
||||||
* @param array $fields
|
* @param array $fields
|
||||||
* @param string $table
|
* @param string $table
|
||||||
* @param string $table
|
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @param DataHandler $dataHandler
|
* @param DataHandler $dataHandler
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -94,13 +94,6 @@
|
|||||||
<f:cObject typoscriptObjectPath="tt_content.list.20.{data.list_type}" data="{data}"/>
|
<f:cObject typoscriptObjectPath="tt_content.list.20.{data.list_type}" data="{data}"/>
|
||||||
</ep:container>
|
</ep:container>
|
||||||
</f:case>
|
</f:case>
|
||||||
<f:comment>Teammembers Plugin</f:comment>
|
|
||||||
<f:case value="epproducts_teammembers">
|
|
||||||
<f:render section="Header" arguments="{_all}"/>
|
|
||||||
<ep:container data="{data}">
|
|
||||||
<f:cObject typoscriptObjectPath="tt_content.list.20.{data.list_type}" data="{data}"/>
|
|
||||||
</ep:container>
|
|
||||||
</f:case>
|
|
||||||
<f:comment>Default</f:comment>
|
<f:comment>Default</f:comment>
|
||||||
<f:case default="1">
|
<f:case default="1">
|
||||||
<f:cObject typoscriptObjectPath="tt_content.list.20.{data.list_type}" data="{data}"/>
|
<f:cObject typoscriptObjectPath="tt_content.list.20.{data.list_type}" data="{data}"/>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<f:section name="Member">
|
<f:section name="Member">
|
||||||
<div class="col-xs-12 col-sm-6 col-md-3">
|
<div class="col-xs-12 col-sm-6 col-md-3">
|
||||||
<a href="{f:uri.action(
|
<a href="{f:uri.action(
|
||||||
|
pageUid: settings.teamShowPID,
|
||||||
action: 'show',
|
action: 'show',
|
||||||
extensionName: 'epproducts',
|
extensionName: 'epproducts',
|
||||||
pluginName: 'teammembers',
|
pluginName: 'teammembers',
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
<f:layout name="Default"/>
|
<f:layout name="Default"/>
|
||||||
|
|
||||||
<f:section name="Main">
|
<f:section name="Main">
|
||||||
|
<f:render section="Header" arguments="{_all}"/>
|
||||||
|
|
||||||
<div class="container ep-employee-detail">
|
<div class="container ep-employee-detail">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -38,6 +40,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 col-md-offset-4">
|
<div class="col-md-8 col-md-offset-4">
|
||||||
<a href="{f:uri.action(
|
<a href="{f:uri.action(
|
||||||
|
pageUid: settings.teamListPID,
|
||||||
action: 'list',
|
action: 'list',
|
||||||
extensionName: 'epproducts',
|
extensionName: 'epproducts',
|
||||||
pluginName: 'teammembers'
|
pluginName: 'teammembers'
|
||||||
@@ -48,4 +51,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</f:section>
|
</f:section>
|
||||||
|
|
||||||
|
<f:section name="Header">
|
||||||
|
<f:if condition="{header}">
|
||||||
|
<ep:container data="{data}">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<f:render partial="Header/Header" arguments="{header: header, subheader: data.subheader, layout: data.header_layout, link: data.header_link, default: settings.defaultHeaderType}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ep:container>
|
||||||
|
</f:if>
|
||||||
|
</f:section>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = [
|
|||||||
880 => 'ajax',
|
880 => 'ajax',
|
||||||
881 => 'ajax',
|
881 => 'ajax',
|
||||||
347 => 'team',
|
347 => 'team',
|
||||||
|
1446 => 'team',
|
||||||
987 => 'events_contactform',
|
987 => 'events_contactform',
|
||||||
1300 => 'events_activity',
|
1300 => 'events_activity',
|
||||||
'newsDetailConfiguration' => [
|
'newsDetailConfiguration' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user