Hallo
Ich versuche den Block name Selector und Modifikator Variable zu gestalten
oder
oder
Das funktioniert aber nicht hat da jemand nen tip für mich ?
$WhSMod und $WhSSelect Sind einstellungsvariablen die ich in der Bootstrap.php fürs frontend verfügbarmache
Ich versuche den Block name Selector und Modifikator Variable zu gestalten
Code:
{block name='{$WhSSelect}' {$WhSMod}}
TEXT
{/block}
Code:
{block name='$WhSSelect' $WhSMod}
TEXT
{/block}
Code:
{block name=$WhSSelect $WhSMod}
TEXT
{/block}
Das funktioniert aber nicht hat da jemand nen tip für mich ?
$WhSMod und $WhSSelect Sind einstellungsvariablen die ich in der Bootstrap.php fürs frontend verfügbarmache
Code:
<Adminmenu>
<Settingslink sort="1">
<Name>Einstellungen</Name>
<Setting type="selectbox" initialValue="append" sort="2" conf="Y">
<Name>Whatsapp Share: Modifikator</Name>
<Description>Wählen Sie zwischen verschiedenen Modifikationstypen aus.</Description>
<ValueName>WhSMod</ValueName>
<SelectboxOptions>
<Option value="before" sort="0">Vor dem Element (before)</Option>
<Option value="prepend" sort="1">Erstes Objekt im Element (prepend)</Option>
<Option value="replaceWith" sort="2">Ersetzen (replaceWith)</Option>
<Option value="append" sort="3">Letztes Objekt im Element (append)</Option>
</SelectboxOptions>
</Setting>
<Setting type="text" initialValue="productdetails-details-info-description-wrapper" sort="1" conf="Y">
<Name>Whatsapp Share: Selector</Name>
<Description>Geben Sie hier eine CSS Klasse oder Id ein, an welche das Element angehängt werden soll.</Description>
<ValueName>WhSSelect</ValueName>
</Setting>
</Settingslink>
</Adminmenu>
Code:
class Bootstrap extends Bootstrapper
{
public function boot(Dispatcher $dispatcher)
{
parent::boot($dispatcher);
$dispatcher->listen('shop.hook.' . \HOOK_SMARTY_INC, function (array $args) {
/** @var JTLSmarty $smarty */
$smarty = $args['smarty'];
$smarty->assign('WhSMod', $this->getPlugin()->getConfig()->getValue('WhSMod'));
$smarty->assign('WhSSelect', $this->getPlugin()->getConfig()->getValue('WhSSelect'));
});
}
}
Zuletzt bearbeitet: