Hey,

If anyone is interested in adding to CouchCMS this new <cms:device> tag, it would be a very good addon.
I learned about this tag here http://documentation.opencms.org/javadoc/tld/index.html and here http://documentation.opencms.org/opencm ... nt-design/

It could look like this, as in sample

Code: Select all
        <cms:device type="mobile">
            <p>You are browsing with a mobile device!</p>
        </cms:device>
        <cms:device type="desktop">
            <p>You are browsing with a desktop device!</p>
        </cms:device>
        <cms:device type="desktop, tablet">
            <p>You are browsing with a tablet or a desktop!</p>
        </cms:device>


Or maybe as a standalone tag, which creates a k_device variable

Code: Select all
        <cms:device />

        <cms:if k_is_mobile >
            <p>You are browsing with a mobile device!</p>
        <cms:else_if k_is_tablet  && k_is_desktop />
            <p>You are browsing with a tablet or a desktop!</p>
        <cms:else_if k_is_desktop />
            <p>You are browsing with a desktop device!</p>
       </cms:if>


Building of this tag can be based on existing php lib Mobile_Detect. It is required very often, since mobiles are today hi-res and building rules for resolution doesn't help much.

Mobile_Detect library can also detect certain devices and sets many useful variables. Perhaps, this could also be used and set as k_device_iphone, k_device_ios sample variables.

Hope anyone's interested.