dude, there's gotta be a better way - incrementing
4.x asp 2.x windows 2003 server, iis 6.x
Is there a better way to write this. I'd like to create a variable that was incremented until it hit a certain number, but then also be able to use that variable to be part of the data call. For example variable 'num' would be added onto 'sliderImage' to make 'sliderImage + num' for sliderImage01, num would increment and then I'd get sliderImage02, etc.
I know how to make the variable and I can probably figure out how to increment it, but how to I integrate it with the [@alias = 'sliderImage01'] part???
Chris, the problem that I have with the repeatable custom content is the fact that it require net3.5. Any other ideas? BTW Wayne you help me a ton! Thanks.
dude, there's gotta be a better way - incrementing
4.x
asp 2.x
windows 2003 server, iis 6.x
Is there a better way to write this. I'd like to create a variable that was incremented until it hit a certain number, but then also be able to use that variable to be part of the data call. For example variable 'num' would be added onto 'sliderImage' to make 'sliderImage + num' for sliderImage01, num would increment and then I'd get sliderImage02, etc.
I know how to make the variable and I can probably figure out how to increment it, but how to I integrate it with the [@alias = 'sliderImage01'] part???
Thanks in advance.
Hi Chau,
I think you could define a recursive template.
And then call it in your main template.
The above call should output 123456789.
Sorry, there is a typo in the recursive template. It should be
you could just append with position() when looping through the for-each loop...
Have you thought about not implementing this as multiple similarly named fields, but instead using the 'Repeatable Custom Content' datatype http://our.umbraco.org/projects/repeatable-custom-content
This would make looping through the field values much easier as they would be represented as child nodes.
Chris
Hey Wayne, thanks for your input I will try it out and give it a go.
Bob, I don't really understand your statement... I'm new at this. Can you give me an example?
Chris, the repeatable custom content looks awesome. Why isn't this part of the umbraco base???
Thanks all!
Chris, the problem that I have with the repeatable custom content is the fact that it require net3.5. Any other ideas? BTW Wayne you help me a ton! Thanks.
I faced the .net3.5 problem also. It seems that there is no solution currently. Maybe you could use child document instead of repeatable property.
is working on a reply...