Using $PARAM as visibility condition
#1
I am confused and frustrated.

Using a highly modded versions of wonderful Silvio skin.

On one of the views (609 or fullscreen wall) there is an includes "InfoPopUp" (which is the includes.xml file).  The produces a pop up with info about the movie, tv show etc currently focused.

What I want to do is pass to the InfoPopUp includes, 2 params "DisplayLogo" "LogoArt" and the reason is so avoid having to have separate coding depending on whether the content is movies, sets, tvshows etc.

So from the view_609.xml the includes call would be 

<include content="InfoPopup">
                    <param name="DisplayLogo">$VAR[609.LogoParamVar]</param>
                    <param name="LogoArtwork">$VAR[609.LogoArtworkParamVar]</param>
</include>

The LogoParamVar is either true or false and the LogoArtworkParamVar is either clearlogo or banner but crucially those variables can have different variables depending on Container.Content and what has been selected for that content type in the view settings.

Here is the bit I am completely confused by.

If in the includes.xml InfoPopUP I was to include a simple label such as <label>Logo: $PARAM[DisplayLogo] Art $PARAM[LogoArtwork]</label> then what is displayed on screen is correct and changes if I change the view settings.

But if I do the same thing but using the PARAM as a visibility condition such as

<control type="label">
   <visible>$PARAM[DisplayLogo]</visible>
   <label>Some Random Label</label>
</control>

Then it does not work.  It seems that PARAMs cannot be used as visibility conditions within the relevant include.  Is that right and if so why because it seems highly limiting
Reply
#2
Params can be used for visible and condition tags. The problem is that vars cannot.

Only booleans can be used as visibility conditions.
https://kodi.wiki/view/List_of_boolean_conditions


You should think of params as xml templates which paste the raw text into the location you specify. They aren't evaluated while the skin is running. Before the window loads, the skin engine pastes the raw text of the param into the location specified by the $PARAM[]

Basically, the param is working correctly. The problem is that your code tells the skin engine to put $VAR[609.LogoParamVar] into <visible>$PARAM[DisplayLogo]</visible> so the end skin xml will look like <visible>$VAR[609.LogoParamVar]</visible> and that's not a valid boolean.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply

Logout Mark Read Team Forum Stats Members Help
Using $PARAM as visibility condition0