HOW-TO:Add a new view type to the skin

Create the extra includes type xml file
We start by creating the new include type xml file. This means we are going to extend the current includes.xml file with another file. While making this file is not strictly needed (you could just add the new view in already huge includes.xml) it is recommended for organizing and readability. In this tutorial the new file we are making is named "Viewtype_Banners.xml".

The content of our viewtype
This example contains one list with banners and one image control. Before we look at them, notice line 2 and 3 of the content. Line two declares we are dealing with includes. Line 3 declares the name of this (or the first) include in this content.

The first image control is separate from the list, is technically placed behind the list in layer depth (first in code), and it requests the thumb image of the currently focussed item in the list. The list shows the banner and the label of the current item. Make sure "font14" is a supported entry in Font.xml or you won't see the text. The example list also has two visible conditions like: Container.Content(tvshows), this is because not all media has banners. Lets not keep you any longer, just paste the below in your empty file (don't forget the xml version).

Lets make it available in the skin
Three little things XBMC needs to know about our new viewtype.

A. Open the file includes.xml. First we need to actually add the extension of includes.xml that we made (Viewtype_Banners.xml) to includes.xml. So we add the following line to includes.xml

B. Open the file MyVideoNav.xml. The skin needs to know in what order the viewtypes get flipped through when we press the "next viewtype" button. So the number of our viewtype 709 needs to get added inbetween the views tags. This line of code should be near the top.

C. Open the file MyVideoNav.xml. Hey great, you already had it open. Now we add the actual include. What did we name our include again in line 3 of our content? Did we use a capital B?  Banners  is what we add. Alright, so maybe you see numbers behind the includes. Kodi does not read those, that is how you format a comment.

That's it
What might be left to do? Well your skin might not have a button to flip through the available viewtypes. So you need to add a button or item to perform this function. Look in the documentation or in the skin if you need an example.

Don't forget to refresh the skin to load the new code. Have a look at the foundation thread for how to do this: http://forum.xbmc.org/showthread.php?tid=94438

Now we can head over to our TV Shows (remember it's not available everywhere) to work on our new viewtype.

Now for your next challenge you can try to change the banner view into something else. How about a panel that loads posters? http://wiki.xbmc.org/?title=Panel_Container

Troubleshooting
Viewtype not showing up? It is possible that the ID you have used for the viewtype is already in use. A good editor like Notepad++ will allow you to search your entire 720p (or other resolution) folder for the ID you used. You can even include the word id and the quotes around the number.

There are some ID's you can't use. The ones used by the window: http://kodi.wiki/view/Window_IDs

And the ones of the mandatory controls: http://kodi.wiki/view/XBMC_Skinning_Manual#.xml_files

Easiest way to know if a number does not belong to a Window or a mandatory control is to look at the numbers used by other skins.