Conditional placement (1 Viewer)

Rob Hexenmeister

MP Donator
  • Premium Supporter
  • May 12, 2011
    243
    59
    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
    189
    104
    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
    243
    59
    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
    3,069
    1,927
    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
    243
    59
    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
    3,069
    1,927
    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
    243
    59
    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


    Write your reply...

    Similar threads

    Well, I had already recognized your problem, but I still wanted to point out the basic connections once again. Unfortunately, I don't have a fundamentally different solution for you, but with this approach you should achieve your goal. ;) The idea of first setting the current genre colors with the defines is certainly a good one, as...
    Well, I had already recognized your problem, but I still wanted to point out the basic connections once again. Unfortunately, I...
    Good afternoon, Does anyone know a way of referencing the genre colour of the currently selected item in the TV Guide. We are all...
    Replies
    4
    Views
    455
    I have an Antec Fusion Remote case with LCD display. Sorry I don't know the driver version, I have to check. But I installed the latest one for Windows 8.1.
    I have an Antec Fusion Remote case with LCD display. Sorry I don't know the driver version, I have to check. But I installed the...
    Good evening, HELP! I have an old installation because I have a family member who relies on the MiniDisplay plug in. It is...
    Replies
    6
    Views
    482
    I think therein lies my problem. I am on 1.6.2.0. So thanks both for your help, I will pause this thread for now and come back to it while I work out what to do next. The problem is we have a family member who relies on MiniDisplay and I don't know if upgrading the set up is going to spoil compatibility with that plug in. The set up...
    I think therein lies my problem. I am on 1.6.2.0. So thanks both for your help, I will pause this thread for now and come back to...
    Good afternoon, Does anybody know of an expression or property I can use within a conditional visibility statement, that detects...
    Replies
    28
    Views
    1K
    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
    1K
    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
    2K
    Top Bottom