Variables in xml without get

  • Hi,

    I know you can define outside variables in the html like:

    Code
    viewer.addVariable("VERSION", '0.1');

    And within xml you can either do

    Code
    get(VERSION)

    in an action or

    Code
    <include url="file.xml?v=%$VERSION%" />

    As a feature I'd like to see something like this:

    Code
    <layer bgcolor="%$COLOR_1%" />

    This would allow for easy changes. Atm usage like this would only be possible, by listing a the plugins, and apply the COLOR_1 to the different attributes or use an onloaded function, which would make stuff a bit more messy

    Code
    <layer onloaded="copy(bgcolor, COLOR_1" />

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!