feat: my&p staging url toggle

This commit is contained in:
Björn Fromme
2026-02-18 11:12:29 +01:00
parent b1ef3dd13c
commit 8be7609a14
13 changed files with 170 additions and 42 deletions
@@ -0,0 +1,28 @@
<?php
namespace EP\EpTheme\ViewHelpers;
use EP\EpProducts\Service\MyEpUrlResolverService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
class MyEpUrlViewHelper extends AbstractViewHelper
{
use CompileWithRenderStatic;
/**
* @param array $arguments
* @param \Closure $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
* @return string
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
): string {
return GeneralUtility::makeInstance(MyEpUrlResolverService::class)->resolve();
}
}
@@ -79,7 +79,6 @@ plugin.tx_eptheme {
myEpApiEndpointUrl = {$plugin.tx_eptheme.settings.myEpApiEndpointUrl}
myEpApiToken = {$plugin.tx_eptheme.settings.myEpApiToken}
myEpApiTimeout = {$plugin.tx_eptheme.settings.myEpApiTimeout}
myEpUrl = {$plugin.tx_epproducts.settings.myEpUrl}
facebookViewContentValues {
productUid = {$plugin.tx_eptheme.settings.facebookViewContentProductUid}
nameInternal = {$plugin.tx_eptheme.settings.facebookViewContentNameInternal}
@@ -37,7 +37,7 @@
</div>
</f:if>
<f:if condition="{settings.myEpPageUid}">
<f:link.typolink parameter="{settings.myEpUrl}" class="topnav__item" title="My E&amp;P">
<f:link.typolink parameter="{ep:myEpUrl()}" class="topnav__item" title="My E&amp;P">
{ep:icon(icon: 'user', class: 'w-5 h-5')}
</f:link.typolink>
</f:if>