Have You Used The XF 1.3 Responsive Template Code?

DRE

Well-known member
Hey I didn't know about this feature until a dude told me about it. Any of y'all using it and how?
 
I thought that was only for .css

I thought that it now applied in normal templates.
 
What do you mean? Responsive Design is related to changing the design in resopnse to screen size, mostly done via JavaScript and CSS.
 
template: ad_above_content

<xen:if is="@enableResponsive">
html code for a Banner: 360 width
<xen:else />
html code for a Banner: 728 width
</xen:if>
Why would you do something like that? enableResponsive is simply a style property, its not an indication of width or anything else.

If your idea is to serve different content depending on width, you are doing it wrong. It is impossible to put such conditional statements in templates because templates are parsed on server side and browser window width is not known. Width detection is done on client side via ether JavaScript or CSS, which happens after templates have been rendered and sent to client.
 
Why would you do something like that? enableResponsive is simply a style property, its not an indication of width or anything else.

If your idea is to serve different content depending on width, you are doing it wrong. It is impossible to put such conditional statements in templates because templates are parsed on server side and browser window width is not known. Width detection is done on client side via ether JavaScript or CSS, which happens after templates have been rendered and sent to client.
Thank you for this basic knowledge I lacked. Got hyped over nothing lol.
 
Back
Top Bottom