I am attempting to replicate the built in control (10) on the MyVideoNav.xml
This button cycles through All videos - Watched - Unwatched, but I would like to customize it to cycle through custom playlists which filter my video library based on if the movie is "New" or not.
For example, I have 3 playlists created - All Movies - Library - NEW
What I have come up with works with the exception that when the playlist opens, MyVideoNav window and the window behind it close, and then the playlist is opened as a new window. I am using <onclick>ReplaceWindow()</onclick>
So the question is - Is there any way switch/change playlists without MyVideoNav closing? I just want the video list behind it to change based on which playlist is toggled, in the same way button 10 functions.
Here is the code I came up with:
Thanks in advance!
This button cycles through All videos - Watched - Unwatched, but I would like to customize it to cycle through custom playlists which filter my video library based on if the movie is "New" or not.
For example, I have 3 playlists created - All Movies - Library - NEW
What I have come up with works with the exception that when the playlist opens, MyVideoNav window and the window behind it close, and then the playlist is opened as a new window. I am using <onclick>ReplaceWindow()</onclick>
So the question is - Is there any way switch/change playlists without MyVideoNav closing? I just want the video list behind it to change based on which playlist is toggled, in the same way button 10 functions.
Here is the code I came up with:
MyVideoNav.xml:<control type="button" id="1">
<description>Custom Library Toggle</description>
<textwidth>255</textwidth>
<label>$VAR[CustomLibraryToggle]</label>
<include>ButtonCommonValues</include>
<onclick condition="String.IsEqual(Container.FolderName,1. All Movies)">ReplaceWindow(Videos,special://profile/playlists/video/2. Library.xsp,return)</onclick>
<onclick condition="String.IsEqual(Container.FolderName,2. Library)">ReplaceWindow(Videos,special://profile/playlists/video/3. New.xsp,return)</onclick>
<onclick condition="String.IsEqual(Container.FolderName,3. New)">ReplaceWindow(Videos,special://profile/playlists/video/1. All Movies.xsp,return)</onclick>
<label2>[COLOR $VAR[ThemeLabelColor]]$INFO[Container.NumItems][/COLOR]</label2>
<visible>Container.Content(movies)</visible>
</control>
Variables.xml:<variable name="CustomLibraryToggle">
<value condition="String.IsEqual(Container.FolderName,1. All Movies)">All Movies</value>
<value condition="String.IsEqual(Container.FolderName,2. Library)">Library</value>
<value condition="String.IsEqual(Container.FolderName,3. New)">NEW</value>
</variable>
Thanks in advance!