Can I get a : into a define value? (2 Viewers)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,544
    3,932
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I need to have something like "<define>#menu3.but3linkpar:categoryid:40</define>"
    where "#menu3.but3linkpar" is the name and "categoryid:40" is the value??? I've tried it with ' " ( [ nothing workes... The value stays at "categoryid", the rest is cut off...
    I want to pass a Moving Pictures Hyperlink Parameter to a dynamically created menu- button. Same problem if you want to use a path as value (e.G. c:\ProgramData\Team MediaPortal\). This gives the drive letter only...
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Maybe try a string format expression e.g.

    Code:
    <define>#menu3.but3linkpar:string.format('categoryid:{0}','40')</define>
     
    Last edited:

    Pog

    Retired Team Member
  • Premium Supporter
  • September 7, 2009
    401
    315
    Wicklow
    Home Country
    Ireland Ireland
    I needed to use colons in a define and tried everything. MP's code uses the colon as a delimiter for defines and will break if there is more then one colon anywhere on the define line.

    Had a brain burp and came up with this:

    Code:
    <control>
      <description>POG: fix for colon use in defines</description>
      <type>label</type>
      <label>#(iif(neq(#colon,':'),skin.setstring('#colon',':'),''))</label>
      <visible>no</visible>
    </control>

    Put that in your skin. Then if you need a colon use #colon.

    For your example: <define>#menu3.but3linkpar:categoryid#colon40</define>
     

    bta489

    Portal Pro
    March 17, 2013
    167
    92
    Home Country
    Germany Germany
    @Pog

    Thank you very much! Nice Work, I've been trying this for a while now, but since I'm quite new to skinning and xml there was no way I'd come up with something similar. Very helpful solution.
     

    Users who are viewing this thread

    Top Bottom