Loading...
Skip navigation
Black Week: 25% off all TYPO3 extensions from November 23 to 30 – services and SaaS offers are excluded.
Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.

Styling the AMP view

Styling the AMP view works just like normal HTML pages which are styled by using CSS. The AMP-Extension comes with a small Static-Template, which contains some basic styles. To use it just include the Static-Template.

Static-Template styles are contained in a TypoScript-Node:

plugin.tx_amp {
    settings {
        stylesheets.basic (
            body {
                background-color: white;
                padding: 15px;
            }
            /* ..more styles.. */
        )
    }
}

To add additional styles for a specific AMP view, you need to add them to the additionalTypoScript node as follows:

plugin.tx_amp {
    settings {
        stylesheets.additional (
            /* Specific styles for the EXT:openimmo */
            body {
                background-color: red;
            }
            /* ..more styles.. */
        )
    }
}

Internally the AMP-Extension merges stylesheets.basic and stylesheets.additional and compresses it, so that it fits well into the AMP view.

Warning:

AMP doesn't allow all styles! More information on: https://www.ampproject.org/docs/guides/responsive/style_pages

Last change: 2023-09-08

Contact request

You can contact us at any time

Stop! Playing in the meantime?
Stop! Playing in the meantime?
Stop! Playing in the meantime?

Stop! Playing in the meantime?

Break the highscore

Press Start
Contact request
Screenreader label
Security question
4OS_________MJW______
__L____4____Q_L___PIQ
6DL___QLX___PIW______
Z______Z____P_P___P6J
ZAN_________D7C______
Dein Online-
Adventskalender
Entdecken →