Conditional placement (1 Viewer)

Rob Hexenmeister

MP Donator
  • Premium Supporter
  • May 12, 2011
    219
    57
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    Good evening,

    Can anyone please tell me what is wrong with the following syntax:

    <posX>#(iif(eq(#facadeview.layout,"list"),1282,0))</posX>

    Many thanks
    RH
     

    bta489

    Portal Pro
    March 17, 2013
    170
    95
    Home Country
    Germany Germany
    Not 100% sure, the wiki is unreachable for me right now to verify. Does the <posX>#(iif(facadeview.list,1282,0))</posX> work?

    I did a quick search in my local skin files. For what it's worth, this property is being used inside many, many of the <visible>-Elements of all skins I have installed. By contrast I could only find 2 occurences of the #facadeview.layout-Property in all my local files.
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    219
    57
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    Not 100% sure, the wiki is unreachable for me right now to verify. Does the <posX>#(iif(facadeview.list,1282,0))</posX> work?

    I did a quick search in my local skin files. For what it's worth, this property is being used inside many, many of the <visible>-Elements of all skins I have installed. By contrast I could only find 2 occurences of the #facadeview.layout-Property in all my local files.
    Thank you for the idea, but no, it doesn't. In fact xpos doesn't seem to like any expressions at all, only integers.
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,891
    1,811
    Southampton
    Home Country
    United Kingdom United Kingdom
    <posX>#(iif(eq(#facadeview.layout,"list"),1282,0))</posX>
    I have just checked DWHD and my own "Clarity" skin, and there is not a single instance of posX or posY containing expressions. I have a vague recollection that expressions are supported only for specific tags, and posX/posY are not included in that set.

    I think that you will need to duplicate the entire control (with different values for posX), and then use the visible tag to select one or the other.

    -- from CyberSimian in the UK
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    219
    57
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    I have just checked DWHD and my own "Clarity" skin, and there is not a single instance of posX or posY containing expressions. I have a vague recollection that expressions are supported only for specific tags, and posX/posY are not included in that set.

    I think that you will need to duplicate the entire control (with different values for posX), and then use the visible tag to select one or the other.

    -- from CyberSimian in the UK
    Thank you, yes that is my conclusion too, but it won't work as it is Control id 2 on the video shares screen that I wanted to conditionally place, and I can't duplicate the ids.

    Things I have tried:
    Duplicating the control with the same ID and using the visible tag - won't work because of duplicate ID
    Using slide to move the control - won't work because the focus doesn't move with the slid position and stays in the original x,y location
    Using the expressions
    Trying to use a define.

    Looks like I am stuck with it unless anyone has a solution.

    Many thanks.
    RH
     

    CyberSimian

    Test Group
  • Team MediaPortal
  • June 10, 2013
    2,891
    1,811
    Southampton
    Home Country
    United Kingdom United Kingdom
    it is Control id 2 on the video shares screen that I wanted to conditionally place
    Is this the file "MyVideos.xml"? Control id 2 seems to be the "View as" button that in "DWHD" and "Clarity" appears inside the group that forms the left side menu. What effect are you trying to achieve?
    • "View as" button always on screen, but in different positions, according to the current facade.
    • "View as" button appears and disappears as part of a menu, but the menu has different positions according to the facade.
    The only possibility that occurs to me at the moment is to create two small files each containing control id 2, with the different X positions, and then use the include tag to include each file with a condition that tests the current facade value. So when the facade is "list", file A is included; when the facade is not "list", file B is included. However...

    To work properly, it would require the skin engine to re-interpret "MyVideos.xml" when the facade value is changed, and I don't know whether it does that. o_O

    -- from CyberSimian in the UK
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    219
    57
    Slaithwaite
    Home Country
    United Kingdom United Kingdom
    Is this the file "MyVideos.xml"?
    Good evening,

    Yes, exactly that one.
    Principally, effect one is the most important, placing the menu controls according to the current facade.

    That is an interesting idea, using the include tag. I don't know either, whether the page is reloaded on facade change. I would have to try that out.

    You have got me thinking though that another possibility, if the skin does not reload on facade change, might be to send the focus to another screen (very briefly) on changing the facade:

    on the videos.xml
    #(skin.setfocus(35,999)


    on another screen (in this example window id 35)
    <id>999</id>
    <onfocus>#(skin.setfocus(2,50)</onfocus>

    But the question would be how to trigger the first #(skin.setfocus(35,999)) on the videos.xml window. I wouldn't want to do it every time focus is lost from control id<2> and if I put the setfocus command in <on click> that might stop the actual purpose of the control changing the facade from working.

    Definitely some things to experiment with. Thank you for your input.
     

    Users who are viewing this thread

    Similar threads

    MP1 MP2 Volume property DE
    Thank you very much
    Thank you very much
    Good evening, Does anyone know if there is a Mediaportal property to report the current volume level as an integer? I have looked...
    Replies
    2
    Views
    636
    Oh no. That's not good news. It looks like this is going to be complicated. OnlineVideos won't let us record, so that isn't going to work on this occasion, but I do like the information you have given on Online Videos because I have tried and failed to understand the wiki on that. I will remember this for future use. In the meantime...
    Oh no. That's not good news. It looks like this is going to be complicated. OnlineVideos won't let us record, so that isn't going...
    Good evening! I am trying to set up a TV channel in the TV server to show my live stream from a local camera. I am clearly doing...
    Replies
    14
    Views
    464
    Sums up the problem I am having. Sorry if I wasn't clear. No, #selectedthumb is not preserved on going to the next window. That's exactly what I am trying to solve. An example is moving from mytvrecordedtv.xml to mytvRecordedInfo. The variable changes from a screen grab thumbnail from the video file to a channel logo during...
    Sums up the problem I am having. Sorry if I wasn't clear. No, #selectedthumb is not preserved on going to the next window. That's...
    Good evening, I have a basic understanding of using skin.setstring and am able to set a skin property when a control gets focus...
    Replies
    2
    Views
    901
    I´ll have a look and report back ;)
    I´ll have a look and report back ;)
    Hello @ajs, I would like to add an additional animation for the winner of the MP game Hexxagon in the file MyHexxagon.xml, as used...
    Replies
    2
    Views
    514
    Thank you so much, I have downloaded and then cut and pasted the files into their respective locations and iPlayer has its subcategories restored and a few of the broken sites that I had are now back and working. I think it proves that the core program is fine, but there is a problem with the internet connection. I have no idea what...
    Thank you so much, I have downloaded and then cut and pasted the files into their respective locations and iPlayer has its...
    Good evening I never was able to solve my TLS problems and my Online Videos installation is now getting seriously outdated (here...
    Replies
    6
    Views
    1K
    Top Bottom