Render submenu with standard button colors
This commit is contained in:
@@ -30,6 +30,7 @@ namespace EP\EpProducts\Controller;
|
|||||||
use EP\EpProducts\Domain\Model\Concept;
|
use EP\EpProducts\Domain\Model\Concept;
|
||||||
use EP\EpProducts\Domain\Repository\ConceptRepository;
|
use EP\EpProducts\Domain\Repository\ConceptRepository;
|
||||||
use EP\EpProducts\Service\ProductDataService;
|
use EP\EpProducts\Service\ProductDataService;
|
||||||
|
use EP\EpTheme\Domain\Repository\PageRepository;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||||
|
|
||||||
@@ -46,14 +47,21 @@ class ConceptController extends ActionController
|
|||||||
*/
|
*/
|
||||||
protected $productDataService;
|
protected $productDataService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \EP\EpTheme\Domain\Repository\PageRepository
|
||||||
|
*/
|
||||||
|
private $pageRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ConceptRepository $conceptRepository
|
* @param ConceptRepository $conceptRepository
|
||||||
* @param ProductDataService $productDataService
|
* @param ProductDataService $productDataService
|
||||||
|
* @param PageRepository $pageRepository
|
||||||
*/
|
*/
|
||||||
public function __construct(ConceptRepository $conceptRepository, ProductDataService $productDataService)
|
public function __construct(ConceptRepository $conceptRepository, ProductDataService $productDataService, PageRepository $pageRepository)
|
||||||
{
|
{
|
||||||
$this->conceptRepository = $conceptRepository;
|
$this->conceptRepository = $conceptRepository;
|
||||||
$this->productDataService = $productDataService;
|
$this->productDataService = $productDataService;
|
||||||
|
$this->pageRepository = $pageRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -75,11 +83,15 @@ class ConceptController extends ActionController
|
|||||||
$excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true);
|
$excludedConceptUids = GeneralUtility::trimExplode(',', $this->settings['excludedConceptUids'], true);
|
||||||
$limit = $this->settings['showMoreLink'] ? 4 : 0;
|
$limit = $this->settings['showMoreLink'] ? 4 : 0;
|
||||||
$teasers = $this->productDataService->getTeasergroup($filterSettings, $excludedConceptUids, $limit);
|
$teasers = $this->productDataService->getTeasergroup($filterSettings, $excludedConceptUids, $limit);
|
||||||
|
$pages = $this->pageRepository->findPagesByPid($this->settings['conceptsPageUid']);
|
||||||
|
$data = $this->configurationManager->getContentObject()->data;
|
||||||
|
|
||||||
$this->view->assignMultiple([
|
$this->view->assignMultiple([
|
||||||
'teasers' => $teasers,
|
'teasers' => $teasers,
|
||||||
'concept' => $concept,
|
'concept' => $concept,
|
||||||
'filterSettings' => $filterSettings,
|
'filterSettings' => $filterSettings,
|
||||||
|
'pages' => $pages,
|
||||||
|
'data' => $data,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
_defaults:
|
||||||
|
autowire: true
|
||||||
|
autoconfigure: true
|
||||||
|
public: false
|
||||||
|
|
||||||
|
EP\EpTheme\:
|
||||||
|
resource: '../Classes/*'
|
||||||
|
exclude: '../Classes/Domain/Model/*'
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
<html data-namespace-typo3-fluid="true" lang="en"
|
<html data-namespace-typo3-fluid="true" lang="en"
|
||||||
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
|
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
|
||||||
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers"
|
xmlns:ep="http://typo3.org/ns/EP/EpTheme/ViewHelpers">
|
||||||
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers">
|
|
||||||
|
|
||||||
<f:layout name="Default"/>
|
<f:layout name="Default"/>
|
||||||
|
|
||||||
@@ -73,16 +72,18 @@
|
|||||||
</p>
|
</p>
|
||||||
</f:if>
|
</f:if>
|
||||||
<ul class="list-none p-0 m-0 space-y-2">
|
<ul class="list-none p-0 m-0 space-y-2">
|
||||||
<v:menu pageUid="{settings.conceptPageUid}" as="menu">
|
<f:for each="{pages}" as="page">
|
||||||
<f:for each="{menu}" as="page">
|
<f:if condition="{page.hidden}">
|
||||||
<li>
|
<f:else>
|
||||||
<f:link.typolink parameter="{page.uid}"
|
<li>
|
||||||
class="button w-full">
|
<f:link.typolink parameter="{page.uid}"
|
||||||
{page.title}
|
class="button button--light{f:if(condition: '{data.pid} == {page.uid}', then: ' button--active')} w-full">
|
||||||
</f:link.typolink>
|
{page.title}
|
||||||
</li>
|
</f:link.typolink>
|
||||||
</f:for>
|
</li>
|
||||||
</v:menu>
|
</f:else>
|
||||||
|
</f:if>
|
||||||
|
</f:for>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user