HEAT readfile sequentially and assign the value

asked 2018-11-13 23:01:00 -0500

anonymous user


I have a file with data:

like that 50 entries.

I want to create a template where in I want to go over a loop, assign the first 3 so template have 3 variables: a, b,c want to assign first 3 elements to a,b,c. than 4th, 5th,6th to a,b,c..

how can I do that ? one way I can think of doing is if I write in template a=11111, b=22222 c=33333 I can do get_file as a resource and assign the values. But as my variables are repeating continuisly I am looking for a repeat: but having issue how to assign the values in 2nd iteration?

edit retag flag offensive close merge delete


The answer likely involves the yaql function, but it's not clear enough from your question what you expect the output to look like to give a definitive answer.

zaneb gravatar imagezaneb ( 2018-11-19 13:36:57 -0500 )edit