• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Have You Used The XF 1.3 Responsive Template Code?

Jeremy

Well-known member
#5
What do you mean? Responsive Design is related to changing the design in resopnse to screen size, mostly done via JavaScript and CSS.
 

Arty

Well-known member
#8
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.
 

DRE

Well-known member
#9
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.