Re: [fat-free-framework] Template Iterator

77 views
Skip to first unread message
Message has been deleted

Fernando Magrosoto Vásquez

unread,
Jul 26, 2022, 11:23:12 AM7/26/22
to Julian Moors via Fat-Free Framework
I suggest you create an a multidimensional array with all of those data.
And just do one simple parse.

<repeat group=“{{@myArray}}” value=“{{@item}}”>
<tr class="border-bottom">
<td class="text-start fw-500">{{@item.line}}</td>
<td class="text-start fw-500">{{@item.location}}</td>
<td class="text-start fw-500">{{@item.upc}}</td>
<td>
<div class="fw-500">{{@item.product}}</div>
<div class="small text-muted d-none d-md-block">{{@item.description}}</div>
</td>
<td class="text-end fw-500">{{@item.quantity}} EA</td>
<td class="text-start fw-500">
<span class="badge bg-info">{{@item.status}}</span>
</td>
</tr>
</repeat>




El 26 jul 2022, a las 10:17, Julian Moors via Fat-Free Framework <f3-fra...@googlegroups.com> escribió:

I'm trying to iterate through a series of arrays using a template something like this:

<repeat group="{{@lines, @locations, @upcs, @products, @descriptions, @quantities, @statuses}}" value="{{@line, @location, @upc, @product, @quantity, @status}}">
<tr class="border-bottom">
<td class="text-start fw-500">{{@line}}</td>
<td class="text-start fw-500">{{@location}}</td>
<td class="text-start fw-500">{{@upc}}</td>
<td>
<div class="fw-500">{{@product}}</div>
<div class="small text-muted d-none d-md-block">{{@description}}</div>
</td>
<td class="text-end fw-500">{{@quantity}} EA</td>
<td class="text-start fw-500">
<span class="badge bg-info">{{@status}}</span>
</td>
</tr>
</repeat>

How can I get this to work?

--
-- You've received this message because you are subscribed to the Google Groups group. To post to this group, send an email to f3-fra...@googlegroups.com. To unsubscribe from this group, send an email to f3-framework...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/f3-framework?hl=en
---
You received this message because you are subscribed to the Google Groups "Fat-Free Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to f3-framework...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/f3-framework/c5e542c3-7676-498b-83eb-74f27b1261f1n%40googlegroups.com.

Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages