Styling - matoilic/t3chimp GitHub Wiki
Changing the template path
To make changes to either the templates or the partial templates just copy the contents of the relating folder in the extension directory (Resources/Private) to a location of your choice. Then in the setup of the containing page set the variable plugin.tx_t3chimp.view.templateRootPath
for the template path and plugin.tx_t3chimp.view.partialRootPath
for the partial template path.
Adapting the templates
To change the order in which the fields are rendered you have to adapt the Form.html template.
There are two view helpers to render a field. form.formField
will render an individual field. Just pass the merge tag of the field that you want to render in the property attribute
and the helper will take care of finding and processing the related partial template of the corresponding field type.
The form.remainingFields
helper will render all remaining fields that have not yet been rendered. This is especially useful if you only want move one or two fields to the top of the form and then render the remaining fields in the order as they were specified in the form designer of MailChimp.
If you want to change the look of a certain field type just adapt the corresponding partial template. All templates are named after the type they represent. But be careful to not remove the classes t3chimp-form
and t3chimp-field-FORM_ACTION
since these are used by the JavaScript handler to handle the form submission.
Blank options in select fields
All select fields have a blank option by default. If you don't want a field to have it, you can turn it of by specifying the attribute includeBlank="FALSE" in the template for the specific field. Also, if you want the blank option to have a label you can set it with the attribute blankLabel="XXX".