feat: my&p staging url toggle
This commit is contained in:
@@ -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&P">
|
||||
<f:link.typolink parameter="{ep:myEpUrl()}" class="topnav__item" title="My E&P">
|
||||
{ep:icon(icon: 'user', class: 'w-5 h-5')}
|
||||
</f:link.typolink>
|
||||
</f:if>
|
||||
|
||||
Reference in New Issue
Block a user