Solved !String.IsEqual(ListItem.HasVideoVersions) issue
#1
Code:
<param name="visible" value="!String.IsEqual(ListItem.HasVideoVersions) + String.IsEqual(ListItem.DBType,movie)" />

i am trying to hide the versions button for movies that don't have versions bit it does not work, it hides them from all, even if the movie has versions
Reply
#2
You're using a string compare with a boolean condition!

Try <param name="visible" value="ListItem.HasVideoVersions" />
Reply
#3
(2024-06-02, 23:33)Hitcher Wrote: You're using a string compare with a boolean condition!

Try <param name="visible" value="ListItem.HasVideoVersions" />

interesting, this is the existing button:

Code:
<include content="InfoDialogSmallButton">
                   <param name="id" value="14" />
                   <param name="icon" value="icons/infodialogs/versions.png" />
                   <param name="label" value="$LOCALIZE[40210]" />
                   <param name="visible" value="String.IsEqual(ListItem.DBType,movie)" />
               </include>

so it made sense to add "!String.IsEqual(ListItem.HasVideoVersions) +"
Reply
#4
ListItem.HasVideoVersions is a boolean condition meaning it will be either true or false. You were using it in a String.IsEqual(info,string) check and not checking it against another value.
The String.IsEqual(ListItem.DBType,movie) can be dropped as it will only return true if it has versions.
Reply
#5
(2024-06-03, 01:07)Hitcher Wrote: ListItem.HasVideoVersions is a boolean condition meaning it will be either true or false. You were using it in a String.IsEqual(info,string) check and not checking it against another value.
The String.IsEqual(ListItem.DBType,movie) can be dropped as it will only return true if it has versions.

oh my.....im so sorry. i was way over thinking it. thank you so much
Reply
#6
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
!String.IsEqual(ListItem.HasVideoVersions) issue0