TYPO3 Powermail v7.3添加CSS类

时间:2019-05-09 08:03:58

标签: typo3 powermail

我想将CSS类插入选择框。 Powermail怎么可能?

TCEFORM {
  tx_powermail_domain_model_form {
    css {
      addItems {
        newCssClass = new-class
      }
    }
  }
  tx_powermail_domain_model_page < .tx_powermail_domain_model_form
  tx_powermail_domain_model_field < .tx_powermail_domain_model_form
}

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:1)

覆盖选择的部分。

在TypoScript中

plugin.tx_powermail {
    view {
        partialRootPath >
        partialRootPaths {
            10 = EXT:powermail/Resources/Private/Partials/
            20 = EXT:yourextension/Resources/Private/Partials/
        }
    }
}

EXT:您的扩展名/资源/私人/部分/表格/字段/Select.html

{namespace vh=In2code\Powermail\ViewHelpers}

<div class="powermail_fieldwrap powermail_fieldwrap_type_select powermail_fieldwrap_{field.marker} {field.css} {settings.styles.framework.fieldAndLabelWrappingClasses}">
    <label for="powermail_field_{field.marker}" class="{settings.styles.framework.labelClasses}" title="{field.description}">
        <vh:string.RawAndRemoveXss>{field.title}</vh:string.RawAndRemoveXss><f:if condition="{field.mandatory}"><span class="mandatory">*</span></f:if>
    </label>
    <div class="{settings.styles.framework.fieldWrappingClasses}">
        <vh:Form.SelectField
                options="{field.modifiedSettings}"
                property="{field.marker}"
                class="new-class powermail_select {settings.styles.framework.fieldClasses} {vh:Validation.ErrorClass(field:field, class:'powermail_field_error')}"
                id="powermail_field_{field.marker}"
                additionalAttributes="{vh:Validation.ValidationDataAttribute(field:field)}"
                multiple="{field.multiselectForField}"
                value="{vh:Misc.PrefillField(field:field, mail:mail)}" />

        <f:if condition="{field.multiselect}">
            <f:if condition="{settings.validation.client}">
                <div class="powermail_field_error_container powermail_field_error_container_{field.marker}"></div>
            </f:if>
        </f:if>
    </div>
</div>