Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
xoceunder
Roku Guru

How to work with 2 content

I want to be able to do 2 content to show 2 lists

I am using this topic I want to show the category list 
https://forums.roku.com/viewtopic.php?f ... 60#p508624
0 Kudos
3 REPLIES 3
xoceunder
Roku Guru

Re: How to work with 2 content

Any help please I want to be able to make them change the listing by category
0 Kudos
xoceunder
Roku Guru

Re: How to work with 2 content

EPGGrid.xml
<?xml version="1.0" encoding="utf-8" ?> 

<component name="customEPGGrid" extends="EPGGrid" >

    <children>

    <ContentNode id = "coreList" role = "content" />
  
        <ParseEpg
            id="ParseEpg"/>

    </children>
 
    <script type="text/brightscript" uri="pkg:/components/EpgGrid.brs"/>
</component>


EpgGrid.brs
' ********** Copyright 2016 Roku Corp.  All Rights Reserved. **********  

function init()
   print "EpgGrid.brs"
   
   m.ParseEpg  = m.top.FindNode("ParseEpg")
   m.ParseEpg.uri="http://localhost/channel_epg.php?tipo=6"
   m.ParseEpg.observefield("content","contentdownloaded")
   m.ParseEpg.observefield("category","categorydownloaded")
   m.ParseEpg.functionName = "contentdownloaded"
   m.ParseEpg.control="RUN"
   
   m.list = m.top.FindNode("coreList")
   m.list.SetFocus(TRUE)

   m.top.translation  = [40, 555]
   m.top.numRows = 5
   m.top.duration = 10800
   m.top.nowNextMode = true
   m.top.infoGridGap = 0
   m.top.channelInfoColumnLabel = "Channel"
   m.top.setFocus(true)
   m.top.jumpToItem = 0
  
End function

Function contentdownloaded()
m.parseepg.unobservefield("content")
    m.top.content=m.parseepg.content
End Function

Function categorydownloaded()
m.parseepg.unobservefield("category")
print "Categoria =>> "; m.parseepg.category
    m.list.content = m.parseepg.category

End Function


0 Kudos
xoceunder
Roku Guru

Re: How to work with 2 content

How to show <Component: roSGNode> in list
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.