View Full Version : Variables
vanessayr
07-26-07, 06:29 PM
Hello I was wondering if I can declare my own variables in Miva 5. I need to declare a numeric variable.
What are you trying to do?
The Emporium Plus Tool Kit lets you assign variables in the page templates. See
http://www.emporiumplus.com/go/wcw/PROD/1AA/1AA00223
vanessayr
07-26-07, 07:14 PM
I hope I don't get in trouble but it has to do with another thread I posted I just wasn't sure If it being a different question neede to be posted on a different one.
Well I am trying to display 4 products in a row only if their custom field is null.It works but the only problem is this:
Let's say I have product1, product2,product3,product4,......6
If for the 6 of them the custom field is null, there is no problem it will display correctly.
Now supose the custom field is being compared is not NULL for product2.In that case it will display 3 in a row instead of 4.
So I figured that if I declared a variable pos2 I could do something like this.
pos2=0
<mvt:foreach iterator="product" array="products">
<mvt:if pos1 - pos2 = 1>
display product
<mvt:else>
pos1=pos1+1
</mvt:if>
pos2=pos1
</mvt:foreach>
I am not even sure that is going to work but I wanted to see if it's possible to declare variables so I can try to make it work.Otherwise the only solution I see is to upload the products in order(the ones with custom null first and then the ones with custom field not null)
Thank you
I haven't had much luck manipulating the pos1 variable. I tried &mvte:pos1; and got nothing.
vanessayr
07-26-07, 07:37 PM
Thank you for your rapid response.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.