[TYPO3-english] Testing screen size

Jigal van Hemert jigal.van.hemert at typo3.org
Wed Aug 8 00:09:56 CEST 2012


Hi,

On 7-8-2012 22:55, Jim MacFarlane wrote:
> Can this be done within typoscript so that the values can be known and
> acted upon?
>
> On Aug 7, 2012 11:05 AM, "Steffen Gebert" <steffen.gebert at typo3.org> wrote:
>>> Is there a way in typoscript to test the screen size?
>>
>> no, as such information is not sent with the HTTP request
>>
>> Nowerdays, you usually use CSS (media queries) to do things that
>> depend on the screen size.

As Steffen already told you: no.

The information you need (screen size) is not passed to the server with 
a request. This information is therefore not available on the server 
(the server doesn't know the screen size of the browser) and as a result 
it cannot be used inside TypoScript.

If you need to change the layout depending on the screen size Steffen 
already pointed you in the right direction: use CSS with media queries 
to load a different CSS file for different screen sizes.

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list