Adding Address Bar To Skin
#1
Hello Everyone,

I am in the beginning stages of learning about creating / editing skins.
I am currently using the Confluence and Ace skins as starting points to learn from.

In the Ace skin I am modifying, I am trying to add a kind of address bar very similar to the one in Confluence that appears in the upper left hand corner of your screen when you select an item from the main menu.
There are basically two parts to this address <Category> - <Current Folder>

I have been able to get the "Current Folder" to display, the main question I have is about getting "Category" to show up.
The way this is done for example in the Confluence skin is I believe it is a fixed label that is just added to the proper categories xml file. In the Ace skin you can create / add new items to the main menu, for example video nodes where I don't think they get their own xml files to just add a fixed label to them.

For example if a user of my skin created were to create a video node called "CARTOONS" to their main menu, I don't know of any xml file to add the "CARTOONS" as the <Category> part of the address bar. Also you would have to know what the user is going to name his or her main menu item.

QUESTIONS
1.) Is there any kind of $INFO field that returns the title of the main menu item you are in as the <Category> part of the address bar? (I have tried quite a few ideas but have not found anything that works.)

2.) If there is a way to accomplish this above, the next step is getting the " - <Current Folder>" part to space properly right after the <Category> because each category name length will be different. I think I saw code referring to "gap" or something to that effect, but if anyone has any help they would like to offer on this as well that would be great. (This question also is based on if the labels have to be two separate pieces of code or if the commands can be combined into one xml tag.)


As I mentioned I am new at this so if I am not making any sense, or overlooking something simple I apologize.
I can explain more if anyone has any questions.

Thank you for taking the time to read this and for any help offered.
Reply
#2
For the second part of your question, you'll want to use a horizontal grouplist that contains two labels (one for the <Category> and one for the <Current Folder>.
Reply
#3
For 1 you need to use a variable that changes the string based upon what window is visible or what the content type is e.g.

Code:
<variable name="CategoryAddress">
  <value condition="Window.IsVisible(MyVideoNav.xml) + Container.Content(movies)">Movies</value>
  <value condition="Window.IsVisible(MyVideoNav.xml) + Container.Content(tvshows)">Tv Shows</value>
  <value condition="Window.IsVisible(MyVideoNav.xml)">Videos</value>
  <value condition="Window.IsVisible(MyMusicNav.xml)">Music</value>
</variable>

You'll probably want to use localized strings for those labels also - I just used unlocalized text for demonstration purposes.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#4
Hey guys, thank you very much for your responses.

Sranshaft
Ahh, so common sense.
I had learned about how to create grouplists because the skin I would be looking to create will have a vertical home menu. My mind hears "list" and I instantly think of vertical lines of text, causing me to totally ignore the idea of a "horizontal" grouplist.
Which is what is used to make horizontal home menus among other things. So simple, thank you again for pointing this out.

Jurialmunkey
I am new at this but what you have posted seems to make sense to me.
I will try this out and post back my results.
Thank you so much for pointing me in the right direction.

If anyone else has any more information they would like to share, please feel free to do so.
Thanks Again
Reply
#5
Okay back again, every question I ask seems to lead me to twenty more questions, about twenty more topics.

TOPIC #1
I was able to get these variables to work in the PICTURES and MUSIC categories but I was not successful in the VIDEO and GAMES categories.

VIDEOS
I was able to get the following code to work for the "VIDEOS" main menu item.

Code:
<value condition="Window.IsVisible(MyVideoNav.xml)">Videos</value>

The problem is that it applies this label to all video nodes linked to the main menu.
Does anyone know how to apply a this variable to a specific "video node" like "vnode1"

So lets say you assigned "Video Node 1" to "CARTOONS" as a main menu item, how would you be able to reference this video node?

In researching the following code, it seems that it can only be set to certain "parameters" not sure if a video node is one of them?

Code:
<value condition="Window.IsVisible( ??? ) + Container.Content( ??? )">CARTOONS</value>

Does anyone know what I would put into the above code where I put the question marks?
Overall I am really just having trouble understanding where "video nodes" come from and also babies, but that is for another post.

GAMES (PROGRAMS)
I was able to get the address bar at the top of this category but an interesting thing happens.
Let say you have "GAMES (PROGRAMS)" setup to start a plugin like the Advanced Launcher addon.

When using the Container.FolderName the address bar shows
GAMES - Advanced Launcher
instead of
GAMES - <current folder>

Probably not, but does anyone know if there is a way to fix this, so that it displays
I have to mess around with this one a bit more to test more how this reacts.

Thank You to anyone who actual takes the time to read this and for any help offered.
Reply
#6
And now, on to topic #2

TOPIC #2
I was able to make the address bar into a "horizontal group list" but I did run into a problem.
I made two labels, the first one shows the "CATEGORY NAME" and the label after that show the "CURRENT FOLDER NAME"
I ended basing most of my code on how the Confluence skin displays the address bar.

The first problem I ran into was when these two labels are generated, they end up on top of each other.
I was able to fix this using the <itemgap> tag which puts a space between the labels.
Problem is that it did not appear that the two labels are intelligently keeping the same distance for all the different category names.

For example if I set up the following to be spaced properly
ABCDEFGHI - FOLDERNAME

then category "ABC" displays with extra space
ABC_______ - FOLDERNAME

I am not sure if I am overlooking something simple, or if what I am trying to accomplish just does not work the way I desire.
Both labels I believe should be left justified, I will have to mess around with it a bit more I just figured I would see if I am on the right track.

Confluence seems to have the "category" labels applied to each category xml file specifically as where I am trying to use a variable to accomplish the same thing.

If anyone has any information about this it would be greatly appreciated.
Thank You for taking the time to read this and for any help offered.
Reply
#7
Whats your grouplist code? have you tried
<width>auto</width>
In your labels controls in thw grouplist?

Also pmsl at your where babies come from comment Wink
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#8
QUESTION 1
Not sure if this is even possible but is there any way that Kodi would be able to recognize that a particular video node is visible while it is recognizing that "MyVideoNav.xml" is visible?

Somehow combining
Code:
<value condition="Window.IsVisible(MyVideoNav.xml)">Videos</value>

With something like this code or something similar to this?
Code:
skin.string(vnodes1.path)


QUESTION 2
Thank you again for your reply jurialmunkey, I have width set to auto but it may not be correct in my coding. I am basically using the same code setup found within Confluence but where that skin has each address bar within the categories navigation xml file, I am trying to do it as a variable within a view xml file.
I am holding off showing the code I am using because if I can't get question 1 to work, then question 2 may not be as important because I might have to tell this address bar to F off and to never show its face around my skin again.

I am also sorry that I may have ruined your pants and possibly the chair you sit at when you use your computer, but this is no laughing matter, I have posted my question about babies in a thread in the Kodi Windows section, I will let you know what find out. Hopefully making babies will be easier than making address bars.
Reply
#9
You can use Container.FolderPath to answer the first question. Use it like this:

<value condition="Window.IsVisible(MyVideoNav.xml) + StringCompare($INFO[Container.FolderPath],Skin.Setting(vnodes1.path))">Videos</value>

You could also just use Container.FolderName if you just want the name of the folder (genre, files, title...).

Have a look at the way i did it in Immersive; specifically Includes_Breadcrumb.xml and the top of Variables.xml. Sounds exactly what you're trying to accomplish here.
Reply
#10
Thank you for your response / example Sranshaft but unfortunately I was not able to get this to work in my situation.

I created three video node items on my main menu (home screen).
When I just have the following piece of code in my variables.xml each video nodes navigation screen shows the same header title based on the value I put in. For example each of the these video nodes show "VIDEOS" as the header based on the code below.

Code:
<value condition="Window.IsVisible(MyVideoNav.xml)">VIDEOS</value>

When I put the following code you recommended in, the header did not appear in any of the video nodes navigation screens.

Code:
<value condition="Window.IsVisible(MyVideoNav.xml) + StringCompare($INFO[Container.FolderPath],Skin.Setting(vnodes1.path))">Videos</value>

<value condition="Window.IsVisible(MyVideoNav.xml) + StringCompare($INFO[Container.FolderPath],Skin.Setting(vnodes2.path))">Videos</value>

<value condition="Window.IsVisible(MyVideoNav.xml) + StringCompare($INFO[Container.FolderPath],Skin.Setting(vnodes3.path))">Videos</value>

I may be doing something wrong.
If anyone has any ideas where I may be going wrong and would like to share some help it would be appreciated.

Thank you everyone for all your help and for taking the time to read my posts.
Reply
#11
Code:
StringCompare($INFO[Container.FolderPath],Skin.Setting(vnodes1.path))

should be

Code:
StringCompare(Container.FolderPath,Skin.String(vnodes1.path))
Reply
#12
Question 2 [SOLVED]
Thank You again Sranshaft for your response, by analyzing your skin I was able to get question 2 to work with the spacing of the two labels.
Reply
#13
Question 1
Thank You so much Hitcher for your input, the code you provided worked! I would have never come up with this code.

I was so excited to see this work, but as with many of my experiences with Kodi skin creation, my celebration was short lived.
Yet again a solution leads to more questions. This will most likely be a challenge to any skinner, but hopefully someone will be able to understand what I am saying and may be able to provide some knowledge.

To recap I am trying to get an address bar at the top of my skin in each categories navigation screen.
I have all the coding within my VIEW xml file and I have the variable in, you guessed it, my VARIABLE xml file.
The address bar consists of two labels.
Label 1 = <category name>
Label 2 = <current folder name>
Example: "TV SHOWS - TELETUBBIES" (and I don't even have children, hey shut up!, don't judge me!)

Okay so the code provided works with all the video nodes as far as getting a the proper video category label within each video nodes navigation screen.

QUESTION 1A
The first problem I noticed, was that because a video node is in essence a link to a certain folder already, instead of the navigation screen just showing the category name and nothing else (like it does in MUSIC, PICTURES, etc.), which is what I would like it to do, I get the category name as well as the folder name of that video node.
So for example:
Instead of showing just "TV SHOWS" in the navigation screen
I get "TV SHOWS - TV SHOWS"

Does anyone know of some kind of "visible ! " code or any kind of code to prevent this from happening within the video nodes so that they initially just show the category name?


QUESTION 1B
The next thing I noticed is that when you do go into a folder from the video nodes navigation screen, the category name no longer shows up and you just get the current folders name.

Example:
If you go into the TV SHOWS video node and you have a list of tv show folders, if you select one of those folders the address bar shows.

" - TELETUBBIES"
instead of showing
"TV SHOWS - TELETUBBIES"

It eliminates the category name because the path is no longer visible, not sure if anyone knows a solution to solve this?

Thank You again to everyone that has provided help and to everyone who reads my posts.
Reply
#14
After having a little more time to analyze the problems that I am having in the above post, it is how the following code provided responds in Kodi

Code:
StringCompare(Container.FolderPath,Skin.String(vnodes1.path))

This code works great for each video nodes initial navigation screen but because this code is depending on that initial navigation screen to be visible, once you go into a subfolder, that video nodes path is no longer visible which eliminates that label from the address bar I am trying to display at the top of my skin screen.

Even if I try to just show the current folder at the top using Container.FolderName it still performs oddly because it works well in each video node, but when you go into the other categories (MUSIC, PICTURES, ETC.) initial navigation screens nothing appears because you are not in any current folder, the current folder label only appears once you go into a subfolder within those categories.

It seems that what I am looking to achieve currently cannot be done correctly in Kodi which is unfortunate.
If anyone has anymore ideas they would like to share I am still open to hearing them.
Either way, I thank everyone for your help.
Reply
#15
Tried using SubString?
Reply

Logout Mark Read Team Forum Stats Members Help
Adding Address Bar To Skin0