Kodi Community Forum

Full Version: Another newb question, this time about views
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi again everyone,

As you know I'm a rank beginner when it comes to skinning. My starting base is the "empty" skin which I am modding/rewriting to achieve what I want.

Today I want to do some work on my Movies view, so I opened up myvideonav.xml to have a look. I can't see anywhere in there where the different views for say Movies and TV Shows are.

If I code a view directly into myvideonav.xml is that going to be the default view for everything video related?

How to a specify that for Movies I want view 1 and for TV Shows I want view 2 etc? For that matter for TV Shows I'd want view 3 and for TV Episodes I'd want view 3 etc, you get the point.

I don't want to start just coding only to find out later that I have to redo it all to get my differing views.

If someone could give me a brief overview of the process for creating different views I'd appreciate it.

Thanks in advance.
Alistair
This post explains creating new viewtypes pretty well.

To specify something for movies/tv/season/episodes:

Container.Content(Movies)
Container.Content(tvshows)
Container.Content(seasons)
Container.Content(episodes)
Where does the Container.Content(Movies) command go? In the definition of my view in the commonviews.xml file?

Thanks once again mate, your my new skinning guru Smile
I've just done a search in the wiki for "Container.Content" and it came up blank....AARGH!

Is it surrounded by <content></content>?
I've had a look through the example code you linked to in the other post and I can see where you've put the Container.Content(Movies) between the <visible></visible> tags but isn't that telling xbmc that that view is only visible if the container is showing movies (or any of the other conditions listed)?

What I need to know is HOW to tell the container that it's showing Movies (instead of say TV Shows).

All very confusing.
That's basically what the visible conditions are doing - the views will only be used when the condition is meet.

ie

PHP Code:
<control type="group">
<
visible>Container.Content(movies)</visible>
    <
control type="list" id="50">
        <
viewtype label="View_1">list</viewtype>
        ...
    </
control>
</
control>

<
control type="group">
<
visible>Container.Content(tvshows)</visible>
    <
control type="list" id="51">
        <
viewtype label="View_2">list</viewtype>
        ...
    </
control>
</
control>

<
control type="group">
<
visible>Container.Content(episodes)</visible>
    <
control type="list" id="52">
        <
viewtype label="View_3">list</viewtype>
        ...
    </
control>
</
control
Thanks for your reply Hitcher.
Yeah I understand that the stuff between the <visible></visible> tags are conditions for telling xbmc when to show the views but I'm struggling with how to set the content of a container.

For instance, I have the "Movies" button on my home menu set to take me to videolibrary,movietitles and in my commonviews.xml file have a view called movielist that has

<visible>Window.IsActive(25)</visible>

I have then put

<include>movielist</include>

into my MyVideoNav.xml file but at the moment all I get is a blank screen.

Not even the hard coded images are showing up never mind the list of movies! I despair.

I think somewhere on a basic level I'm understanding it all wrong lol
a black screen is often an indication of some bad (invalid) xml code.
Indeed, what are you using to edit and check the code?
At the minute I'm using Dashcode but even if I comment out everything I've added with <!-- --> I still get the blank screen. It's as if it has opened on a screen because it takes me two or three taps of the esc key to get back to the home menu. I'm thinking it's because I'm using a white background and the Empty skin uses a lot of white text but I could be wrong.
Oh for crying out loud I'm an absolute dope!! I was editing the MyVideoNav.xml file from a different skin....I'm SO sorry guys give me five minutes or so to see if it works with the right bloody skin

God I feel stupid :|
Don't worry about, I've done the same thing myself before.
OK so, using Coda now. Have got the MyVideoNav.xml and Commonviews.xml files back to their originals and started again with my changes.

I've added <include>movielist</include> to the bottom of MyVideoNav.xml and have created a page as an include in CommonViews.xml with <visible>Window.IsActive(videolibrary,movietitles)</visible> as the condition.

Here is my include

Code:
<include name="movielist">
      <control type="Group">
      <visible>Window.IsActive(videolibrary,movietitles)</visible>
      <width>1920</width>
      <height>1080</height>
      <posx>0</posx>
      <posy>0</posy>

    <control type="image">
        <description>White Background</description>
        <posx>0</posx>
        <posy>0</posy>
        <width>1920</width>
        <height>1080</height>
        <texture>whiteback.jpg</texture>
        <visible>true</visible>
        <aspectratio>-</aspectratio>
    </control>
    
    <control type="image">
        <posx>17</posx>
        <posy>72</posy>
        <width>1888</width>
        <height>7</height>
        <aspectratio>stretch</aspectratio>
        <texture>widesep.png</texture>
    </control>
    
    <control type="image">
        <posx>17</posx>
        <posy>705</posy>
        <width>1888</width>
        <height>7</height>
        <aspectratio>stretch</aspectratio>
        <texture>widesep.png</texture>
    </control>
    
    <control type="image">
        <posx>1130</posx>
        <posy>707</posy>
        <width>1</width>
        <height>323</height>
        <aspectratio>stretch</aspectratio>
        <texture>lowmovsep.png</texture>
    </control>
    
    <control type="label">
        <posx>30</posx>
        <posy>30</posy>
        <font>Large</font>
        <textcolor>Black</textcolor>
        <label>Movies</label>
    </control>

  <description>Movie List View</description>
    <control type="wraplist" id="51">

        <orientation>horizontal</orientation>
        <posx>100</posx>
        <posy>150</posy>
        <width>1720</width>
        <height>720</height>
        <onleft>51</onleft>
        <onright>51</onright>
        <onup>51</onup>
        <ondown>51</ondown>
        <viewtype label="movielist">list</viewtype>
        <scrolltime>200</scrolltime>
        <itemlayout width="150" height="220">
        <control type="image">
            <info>ListItem.Icon</info>
        </control>
        </itemlayout>
        <focusedlayout width="300" height="530">
        <control type="image">
            <info>ListItem.Icon</info>
        </control>
        </focusedlayout>
        <focusposition>0</focusposition>
    </control>
</control>
</include>

Should this work?

I should add that what happens now is that I get the default lst view provided by the Empty skin rather than my own view.
OK I've commented out the main group that contained everything and I'm finally getting something, just not my movie list.

How do I tell the skin that my list needs to contain my movies?
Aha! The problem was that I wasn't specifying width and height for my images doh!