2 Replies Latest reply on Nov 2, 2012 3:53 AM by another_dave

    Device group hierarchy




      I raised this issue on the Docs last year, & was advised to start a discussion topic on it here: better late than never



      I'm wondering about creating custom device groups for Mobile in CQ5.5 — is it possible to have a hierarchy and/or supertype on Device Groups? In terms of hiearchy, I mean choosing the order in which the device group is resolved. For example, if I had device groups based on video support: one for OGG/Theora and one for h.264. If I access the site with a phone that supports both formats, is there any way to choose which one the phone will be sent to?


      By supertype, I mean the possibility to have:


      • Device Group Foo
      • Device Group Bar (supertype: Foo)




      • component.foo.jsp
      • component.bar.jsp
      • component.jsp


      If I then have a component, that I'm accessing at /content.bar.html, it will look first for any JSPs with the bar selector, but if not present it will fall back to the foo selector (rather than component.jsp file)? (If this lacks clarity, please shout & I'll give a clearer explaination!)


      Appreciate any insights.




        • 1. Re: Device group hierarchy
          Sham HC Level 7

          See this group filter [1] helps. The url where commented posted refers to 5.4 which does not have group filter.  If groupfilters fits your need file daycare to get HF 35198 so that you can use group filter


          [1]  http://dev.day.com/docs/en/cq/current/developing/mobile/groupfilters.html

          • 2. Re: Device group hierarchy
            another_dave Level 1

            Hi Sham,


            thanks for the reply. Yes, when I originally asked the question we were running 5.4, though we've upgraded since then.


            Basically, the same issue applies with the Device Group filter — the filter provide a boolean sig matches() method that will return true or false if the user-agent matches the capabilities.


            If I want a hierarchy of which group should be matched first though, is this possible? If so, how do I go about this?


            Secondly, can device groups have superTypes? If I want to define functionality for all video-capable devices, I could have a video group, which would allow be to use a video selector on my JSPs, e.g.:


            • richMediaComponent/
              • richMediaComponent.video.jsp
              • richMediaComponent.jsp


            With the above, a device capable of support video could be sent to the first template, and one with just image support to the second. If I now wanted a device group that had video support & a high-res screen. Could I create a group that inherits from the video device group?


            What I want is to have a highResVideo group, that will access my page via the highResVideo selector, but will resolve templates in this order:


            • richMediaComponent.highResVideo.jsp
            • richMediaComponent.video.jsp
            • richMediaComponent.jsp


            Is this possible?


            Thanks for your help.