3

In the powermail documentation it mentions about a field's Layout dropdown:

Administrator can add, remove or rename some of the entries.

How do you add a layout option to the dropdown?

How do you specify what class that new option will add?

DreamOfMirrors
  • 2,147
  • 1
  • 21
  • 34
user500665
  • 1,220
  • 1
  • 12
  • 38

4 Answers4

9

Here is the TS configuration for powermail layouts. This will help you to add, remove and modify layout for powermail form, pages and field.

TCEFORM.tx_powermail_domain_model_form{
        css {
            altLabels.layout1 = Event form
            altLabels.layout2 = Contact form
            removeItems = layout3,nolabel
        }
    }
}

TCEFORM.tx_powermail_domain_model_page{
    css {
        altLabels.layout1 = PERSÖNLICHE DATEN
        altLabels.layout2 = VERANSTALTUNGSDATEN
        altLabels.layout3 = OPTIONAL WEITERE
        # removeItems = layout1, layout2        
        # addItems {
        #         blue = Blue Form
        #         green = Green Form
        #      }
        #  }
    }
}

TCEFORM.tx_powermail_domain_model_field{
    css {
        altLabels.layout1 = Default

        addItems {
                layout4 = Field Title
                layout5 = Block Label
                layout6 = List Day
                layout7 = List Month
                layout8 = List Year
                layout9 = Inputbox with Left Label
                layout10 = Inputbox with Top Label
                layout11 = Label Note
            }
        }
    }
}

Hope, some how this will help you. Greetings!

Geee
  • 2,217
  • 15
  • 30
2

Did you see the manual? There are some useful settings like https://docs.typo3.org/typo3cms/extensions/powermail/Faq/Index.html#how-to-change-the-style-selector-with-my-own-values-in-forms-pages-or-fields

Alex Kellner
  • 1,263
  • 6
  • 11
  • 1
    I searched the manual and found nothing. I didn't think to check FAQ as that's usually only for troubleshooting! Thanks for the tip. – user500665 Aug 24 '17 at 10:36
1

As far as I have seen, in the current Powermail version, the layout option is present in

  • form
  • pages
  • fields

these items are stored in three tables:

  • tx_powermail_domain_model_form
  • tx_powermail_domain_model_page
  • tx_powermail_domain_model_field

and it is a field called "css".

I guess it is possible to use the standard TCEFORM syntax TCEFORM.[table].[field] (https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/TCEform/Index.html#tceform)

so, for example, about the fields:

TCEFORM.tx_powermail_domain_model_field.css{
  addItems  = 4,5
  removeItems = 1,2,3 
}

(I've seen that they are numeric in \Configuration\TCA\tx_powermail_domain_model_field.php )

I don't know if each field is a separate CType, so it would be possible to use also TCEFORM.[table name].[field].types.[type]

0

Little Improvement :

`

TCEFORM {
        tx_powermail_domain_model_form {
                css {
                        addItems {
                                layout4 = Layout 4 - Buy Page
                        }
                }
        }
        tx_powermail_domain_model_page < .tx_powermail_domain_model_form
        tx_powermail_domain_model_field < .tx_powermail_domain_model_form
}

`