using global array in store morph foreach

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Brennan
    replied
    Re: using global array in store morph foreach

    global variables will also work as arrays too however the syntax is slightly different when using them within a foreach loop:

    Code:
    <mvt:foreach iterator="test" array="global:myarray">
    
    </mvt:foreach>
    You need the global: identifier or else, it assumes your using l.settings:

    Leave a comment:


  • compumate99
    replied
    Re: using global array in store morph foreach

    Yes, you are right, Bruce.

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    Re: using global array in store morph foreach

    Originally posted by compumate99 View Post
    It worked.

    Thanks.
    you mean i was right? (Seriously, never tried it exactly)

    Leave a comment:


  • compumate99
    replied
    Re: using global array in store morph foreach

    It worked.

    Thanks.

    Leave a comment:


  • PCINET - Andreas
    replied
    Re: using global array in store morph foreach

    ab
    Last edited by PCINET - Andreas; 11-24-15, 11:41 AM.

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    Re: using global array in store morph foreach

    AFAIK, the array has to be a local variable (sans the l.settings designation).

    Try

    <mvt:assign name="l.settings:myNewArray" value="g.myarray" />

    and then use

    array="myNewArray"

    Leave a comment:


  • compumate99
    started a topic using global array in store morph foreach

    using global array in store morph foreach

    I want to use global array in <mvt:foreach array="global array" iterator="test">

    Using Latu, array was confirmed that it has values shown below.

    myarray[1].code = "A"
    myarray[2].code = "B"
    myarray[3].code = "C"

    I tried

    array="myarray"
    array="g.myarray"
    array="&mvt:global:myarray;"

    None of these worked.

    Is it possible?

    Thank you.
Working...
X