Announcement

Collapse
No announcement yet.

mvt:assign conconcatate

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    mvt:assign conconcatate

    Code:
    <mvt:assign name="g.error_message_count" value="g.error_message_count + 1" />
    <mvt:assign name="g.error_messages $ '[' $ g.error_message_count $ ']'" value="'This is another error message.'" />
    How do I get to dynamically assign array indexes? I get an error message that array index must be a positive number. The code works if I hardcode the array index. I can also conconcatate the value parameter, just not the name parameter.
    http://www.alphabetsigns.com/

    #2
    Re: mvt:assign conconcatate

    i believe in SMT code you'd have to use miva_variable_value or the actual array_ structure calls. (never did one in SMT code though)
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: mvt:assign conconcatate

      Yea, I think you're right. I saw the miva_variable_value example and it doesn't work in my case so I may be stuck with the structure call.

      Thanks for your reply.
      http://www.alphabetsigns.com/

      Comment


        #4
        Re: mvt:assign conconcatate

        An array index would be nice.

        <mvt:assign name="g.error_messages" INDEX="g.error_index" value="'This is another error message'" />
        http://www.alphabetsigns.com/

        Comment


          #5
          Re: mvt:assign conconcatate

          I would agree with you. It is on our radar to add into a future release. Also the ability to use indexes in the name:

          <mvt:assign name="g.array[1]" value="'test'" />
          Brennan Heyde
          VP Product
          Miva, Inc.
          [email protected]
          https://www.miva.com

          Comment

          Working...
          X