Displaying original title and title
#1
On a list of movies, I want to display their name as <originaltitle>, unless <title> is present, in which case it should display <title> instead. How do I do that?

                            <control type="label">
                                <aligny>center</aligny>
                                <left>250</left>
                                <width>580</width>
                                <font>Bold42</font>
                                <textcolor>FFFFFFFF</textcolor>
                                <selectedcolor>FFFFFFFF</selectedcolor>
                                <label>$INFO[ListItem.OriginalTitle]</label>
                                <textwidth>580</textwidth>
                                <scroll>false</scroll>
                            </control>

Is what I have, halfway there. It displays all the names as <originaltitle>, but those that only have a <title> return nothing, obviously.
Reply
#2
Using a variable replace <label>$INFO[ListItem.OriginalTitle]</label> with <label>$VAR[Title]</label> and then add this to your includes.xml.

<variable name="Title">
    <value condition="!String.IsEmpty(ListItem.OriginalTitle)">$INFO[ListItem.OriginalTitle]</value>
    <value>$INFO[ListItem.Title]</value>
</variable>
Reply
#3
Perfect! Thank you so much.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Displaying original title and title00