Forum Discussion

newchannel's avatar
newchannel
Roku Guru
2 years ago

What determines the category order in scenegraph?

What variables determine the order of the categories in scenegraph?

The categories parse but I need to change the order of them. How can I do this? In what file of the package is this controlled?

I've made changes to RootHandler.brs to add category names and have them coded in the json with categories and playlists. I can get the categories to show up but cant get the order I need.

Thank you in advance for all input.

8 Replies

  • Are you saying that the order of the categories within the JSON file are how you want it, but after parsing the order is different?  If so, is the new order alphabetical, random, reversed?  If the order is incorrect in the JSON file, try doing the rearrangement there.

     

  • Instead of using Category tags and playlist try Cateories with queries

    "categories": [{"name":"Newest Programs","query":"newest-programs","order":"most_recent"},
    {"name":"Featured","query":"roku-featured","order":"most_recent"},{"name":"Documentaries",
    "query":"documentaries","order":"most_recent"},
    {"name":"Short Videos","query":"short-videos","order":"most_recent"}, 

    • Baradanikto's avatar
      Baradanikto
      Roku Guru

      newchannel the order of the Categories is going to be dependent upon what the code expects and the algorithm it uses to construct your channel. I have no idea what the code you are using expects.

      Now, I can tell you that the code produced by the DPtoSceneGraph wizard assumes you have defined your Categories in your feed file. If you have valid Categories, the code will display them in a grid in the order they appear in the feed file.

      If the order is not to your liking, you can use the Channel Feed Manager software in my signature below to change them.

      • newchannel's avatar
        newchannel
        Roku Guru

        Sorry for the delay in replying back.

        I was having a problem with my json feed and got it figured out. The json feed from my DP was not converting properly and series / episodes wasn't working. When I started using query and changed the content sections titles it started working.