iterating array displays uneven rows

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

iterating array displays uneven rows

James Sheffer
I’ve got an issue with iterating an array of products.  I’m trying to display 3 columns of product information using bootstrap columns ( <div class="col-sm-4”> ).  I get some rows displaying 3 columns but then intermittently throughout the page I get a few rows that only display one item per row.

On one particular array I am returning 35 items.  Thinking that this isn’t divisible by 4, I changed the  -maxrecords to 32 but still get the same results.

Any ideas on how to correct this?

Thanks!


James Sheffer

Email: [hidden email]
Phone: 469-256-0268
Web: www.higherpowered.com


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: iterating array displays uneven rows

Peter D Bethke
Hi Jim,

How are you determining where to break for the next row? Are you using the modulo tag?

Can you post some code?

Peter

> On May 19, 2017, at 11:14 AM, James Sheffer <[hidden email]> wrote:
>
> I’ve got an issue with iterating an array of products.  I’m trying to display 3 columns of product information using bootstrap columns ( <div class="col-sm-4”> ).  I get some rows displaying 3 columns but then intermittently throughout the page I get a few rows that only display one item per row.
>
> On one particular array I am returning 35 items.  Thinking that this isn’t divisible by 4, I changed the  -maxrecords to 32 but still get the same results.
>
> Any ideas on how to correct this?
>
> Thanks!
>
>
> James Sheffer
>
> Email: [hidden email]
> Phone: 469-256-0268
> Web: www.higherpowered.com
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: iterating array displays uneven rows

Bil Corry-3
This is how I used to do it in LP8, perhaps you can update it to L9.  Makes
putting records into columns super easy.

http://www.lassosoft.com/tagswap/detail/lp_array_columns


- Bil


On Fri, May 19, 2017 at 8:23 AM, Peter D Bethke <[hidden email]>
wrote:

> Hi Jim,
>
> How are you determining where to break for the next row? Are you using the
> modulo tag?
>
> Can you post some code?
>
> Peter
>
> > On May 19, 2017, at 11:14 AM, James Sheffer <[hidden email]>
> wrote:
> >
> > I’ve got an issue with iterating an array of products.  I’m trying to
> display 3 columns of product information using bootstrap columns ( <div
> class="col-sm-4”> ).  I get some rows displaying 3 columns but then
> intermittently throughout the page I get a few rows that only display one
> item per row.
> >
> > On one particular array I am returning 35 items.  Thinking that this
> isn’t divisible by 4, I changed the  -maxrecords to 32 but still get the
> same results.
> >
> > Any ideas on how to correct this?
> >
> > Thanks!
> >
> >
> > James Sheffer
> >
> > Email: [hidden email]
> > Phone: 469-256-0268
> > Web: www.higherpowered.com
> >
> >
> > #############################################################
> >
> > This message is sent to you because you are subscribed to
> >  the mailing list Lasso [hidden email]
> > Official list archives available at http://www.lassotalk.com
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: iterating array displays uneven rows

James Sheffer
In reply to this post by Peter D Bethke
Peter-

I was going to try the modulo tag but wasn’t quite sure how I would use it with "<div class="col-sm-4”>” (as opposed to a table tag where I could break it  with a <tr /> tag).  When I tried to change the -maxrecords to something that would come out evenly (-maxrecords = 32) I thought that would produce the same result.

Here’s what I’m doing now:

[iterate(($prodList), var('a'))]
[($a->get(3))->replace('"', '&quot;')]
[($a->get(7))->replace('"', '&quot;')]
        <div class="col-sm-4">
                <div class="product-image-wrapper single-products">
                        <div class="productinfo text-center”>
                                .. . code here …
                        </div>
                </div>
        </div>
[/iterate]


James Sheffer

Email: [hidden email]
Phone: 469-256-0268
Web: www.higherpowered.com

> On May 19, 2017, at 8:23 AM, Peter D Bethke <[hidden email]> wrote:
>
> Hi Jim,
>
> How are you determining where to break for the next row? Are you using the modulo tag?
>
> Can you post some code?
>
> Peter
>
>> On May 19, 2017, at 11:14 AM, James Sheffer <[hidden email]> wrote:
>>
>> I’ve got an issue with iterating an array of products.  I’m trying to display 3 columns of product information using bootstrap columns ( <div class="col-sm-4”> ).  I get some rows displaying 3 columns but then intermittently throughout the page I get a few rows that only display one item per row.
>>
>> On one particular array I am returning 35 items.  Thinking that this isn’t divisible by 4, I changed the  -maxrecords to 32 but still get the same results.
>>
>> Any ideas on how to correct this?
>>
>> Thanks!
>>
>>
>> James Sheffer
>>
>> Email: [hidden email]
>> Phone: 469-256-0268
>> Web: www.higherpowered.com
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: iterating array displays uneven rows

James Sheffer
Peter & Bill-

Sorry, I forgot to mention - this is using Lasso 8.5 Mac version.

James

> On May 19, 2017, at 11:15 AM, James Sheffer <[hidden email]> wrote:
>
> Peter-
>
> I was going to try the modulo tag but wasn’t quite sure how I would use it with "<div class="col-sm-4”>” (as opposed to a table tag where I could break it  with a <tr /> tag).  When I tried to change the -maxrecords to something that would come out evenly (-maxrecords = 32) I thought that would produce the same result.
>
> Here’s what I’m doing now:
>
> [iterate(($prodList), var('a'))]
> [($a->get(3))->replace('"', '&quot;')]
> [($a->get(7))->replace('"', '&quot;')]
> <div class="col-sm-4">
> <div class="product-image-wrapper single-products">
> <div class="productinfo text-center”>
> .. . code here …
> </div>
> </div>
> </div>
> [/iterate]
>
>
> James Sheffer
>
> Email: [hidden email]
> Phone: 469-256-0268
> Web: www.higherpowered.com
>
>> On May 19, 2017, at 8:23 AM, Peter D Bethke <[hidden email]> wrote:
>>
>> Hi Jim,
>>
>> How are you determining where to break for the next row? Are you using the modulo tag?
>>
>> Can you post some code?
>>
>> Peter
>>
>>> On May 19, 2017, at 11:14 AM, James Sheffer <[hidden email]> wrote:
>>>
>>> I’ve got an issue with iterating an array of products.  I’m trying to display 3 columns of product information using bootstrap columns ( <div class="col-sm-4”> ).  I get some rows displaying 3 columns but then intermittently throughout the page I get a few rows that only display one item per row.
>>>
>>> On one particular array I am returning 35 items.  Thinking that this isn’t divisible by 4, I changed the  -maxrecords to 32 but still get the same results.
>>>
>>> Any ideas on how to correct this?
>>>
>>> Thanks!
>>>
>>>
>>> James Sheffer
>>>
>>> Email: [hidden email]
>>> Phone: 469-256-0268
>>> Web: www.higherpowered.com
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: iterating array displays uneven rows

James Sheffer
In reply to this post by Bil Corry-3
Thanks Bill-

I’m working on this now - I’ll let you know how it goes :-)

James Sheffer

Email: [hidden email]
Phone: 469-256-0268
Web: www.higherpowered.com

> On May 19, 2017, at 9:09 AM, Bil Corry <[hidden email]> wrote:
>
> This is how I used to do it in LP8, perhaps you can update it to L9.  Makes
> putting records into columns super easy.
>
> http://www.lassosoft.com/tagswap/detail/lp_array_columns
>
>
> - Bil
>
>
> On Fri, May 19, 2017 at 8:23 AM, Peter D Bethke <[hidden email]>
> wrote:
>
>> Hi Jim,
>>
>> How are you determining where to break for the next row? Are you using the
>> modulo tag?
>>
>> Can you post some code?
>>
>> Peter
>>
>>> On May 19, 2017, at 11:14 AM, James Sheffer <[hidden email]>
>> wrote:
>>>
>>> I’ve got an issue with iterating an array of products.  I’m trying to
>> display 3 columns of product information using bootstrap columns ( <div
>> class="col-sm-4”> ).  I get some rows displaying 3 columns but then
>> intermittently throughout the page I get a few rows that only display one
>> item per row.
>>>
>>> On one particular array I am returning 35 items.  Thinking that this
>> isn’t divisible by 4, I changed the  -maxrecords to 32 but still get the
>> same results.
>>>
>>> Any ideas on how to correct this?
>>>
>>> Thanks!
>>>
>>>
>>> James Sheffer
>>>
>>> Email: [hidden email]
>>> Phone: 469-256-0268
>>> Web: www.higherpowered.com
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>  the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: iterating array displays uneven rows

Marc Pinnell-3
James,

What you are describing sounds more like an issue with box heights in bootstrap rather than Lasso code. Are all your boxes the same height? If not that could cause bootstrap to appear to skip a box when in reality it doesn’t fit and just moves to the next one. See this (just a quick google, might not be exact): https://jsfiddle.net/wqdm1jjt/ There you can see an example of a 4 column layout and the fifth column ends up stuck on the right since that is the first column it fits in.

Marc

====================
Marc Pinnell
Director of Web Services
[hidden email]
www.shasta.com                                    
833 Mistletoe Lane, Suite A1
Redding, CA  96002
530-224-6866  Ext. 100
530-224-2035 Fax

> On May 19, 2017, at 11:28 AM, James Sheffer <[hidden email]> wrote:
>
> Thanks Bill-
>
> I’m working on this now - I’ll let you know how it goes :-)
>
> James Sheffer
>
> Email: [hidden email]
> Phone: 469-256-0268
> Web: www.higherpowered.com
>
>> On May 19, 2017, at 9:09 AM, Bil Corry <[hidden email]> wrote:
>>
>> This is how I used to do it in LP8, perhaps you can update it to L9.  Makes
>> putting records into columns super easy.
>>
>> http://www.lassosoft.com/tagswap/detail/lp_array_columns
>>
>>
>> - Bil
>>
>>
>> On Fri, May 19, 2017 at 8:23 AM, Peter D Bethke <[hidden email]>
>> wrote:
>>
>>> Hi Jim,
>>>
>>> How are you determining where to break for the next row? Are you using the
>>> modulo tag?
>>>
>>> Can you post some code?
>>>
>>> Peter
>>>
>>>> On May 19, 2017, at 11:14 AM, James Sheffer <[hidden email]>
>>> wrote:
>>>>
>>>> I’ve got an issue with iterating an array of products.  I’m trying to
>>> display 3 columns of product information using bootstrap columns ( <div
>>> class="col-sm-4”> ).  I get some rows displaying 3 columns but then
>>> intermittently throughout the page I get a few rows that only display one
>>> item per row.
>>>>
>>>> On one particular array I am returning 35 items.  Thinking that this
>>> isn’t divisible by 4, I changed the  -maxrecords to 32 but still get the
>>> same results.
>>>>
>>>> Any ideas on how to correct this?
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> James Sheffer
>>>>
>>>> Email: [hidden email]
>>>> Phone: 469-256-0268
>>>> Web: www.higherpowered.com
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: iterating array displays uneven rows

James Sheffer
Marc-

Thank you - that fix the issue!  I didn’t have a height set.  Once I set a specific height, everything fills in correctly!


James Sheffer

Email: [hidden email]
Phone: 469-256-0268
Web: www.higherpowered.com

> On May 19, 2017, at 11:41 AM, Marc Pinnell <[hidden email]> wrote:
>
> James,
>
> What you are describing sounds more like an issue with box heights in bootstrap rather than Lasso code. Are all your boxes the same height? If not that could cause bootstrap to appear to skip a box when in reality it doesn’t fit and just moves to the next one. See this (just a quick google, might not be exact): https://jsfiddle.net/wqdm1jjt/ There you can see an example of a 4 column layout and the fifth column ends up stuck on the right since that is the first column it fits in.
>
> Marc
>
> ====================
> Marc Pinnell
> Director of Web Services
> [hidden email]
> www.shasta.com                                    
> 833 Mistletoe Lane, Suite A1
> Redding, CA  96002
> 530-224-6866  Ext. 100
> 530-224-2035 Fax
>
>> On May 19, 2017, at 11:28 AM, James Sheffer <[hidden email]> wrote:
>>
>> Thanks Bill-
>>
>> I’m working on this now - I’ll let you know how it goes :-)
>>
>> James Sheffer
>>
>> Email: [hidden email]
>> Phone: 469-256-0268
>> Web: www.higherpowered.com
>>
>>> On May 19, 2017, at 9:09 AM, Bil Corry <[hidden email]> wrote:
>>>
>>> This is how I used to do it in LP8, perhaps you can update it to L9.  Makes
>>> putting records into columns super easy.
>>>
>>> http://www.lassosoft.com/tagswap/detail/lp_array_columns
>>>
>>>
>>> - Bil
>>>
>>>
>>> On Fri, May 19, 2017 at 8:23 AM, Peter D Bethke <[hidden email]>
>>> wrote:
>>>
>>>> Hi Jim,
>>>>
>>>> How are you determining where to break for the next row? Are you using the
>>>> modulo tag?
>>>>
>>>> Can you post some code?
>>>>
>>>> Peter
>>>>
>>>>> On May 19, 2017, at 11:14 AM, James Sheffer <[hidden email]>
>>>> wrote:
>>>>>
>>>>> I’ve got an issue with iterating an array of products.  I’m trying to
>>>> display 3 columns of product information using bootstrap columns ( <div
>>>> class="col-sm-4”> ).  I get some rows displaying 3 columns but then
>>>> intermittently throughout the page I get a few rows that only display one
>>>> item per row.
>>>>>
>>>>> On one particular array I am returning 35 items.  Thinking that this
>>>> isn’t divisible by 4, I changed the  -maxrecords to 32 but still get the
>>>> same results.
>>>>>
>>>>> Any ideas on how to correct this?
>>>>>
>>>>> Thanks!
>>>>>
>>>>>
>>>>> James Sheffer
>>>>>
>>>>> Email: [hidden email]
>>>>> Phone: 469-256-0268
>>>>> Web: www.higherpowered.com
>>>>>
>>>>>
>>>>> #############################################################
>>>>>
>>>>> This message is sent to you because you are subscribed to
>>>>> the mailing list Lasso [hidden email]
>>>>> Official list archives available at http://www.lassotalk.com
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>> #############################################################
>>>>
>>>> This message is sent to you because you are subscribed to
>>>> the mailing list Lasso [hidden email]
>>>> Official list archives available at http://www.lassotalk.com
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>> the mailing list Lasso [hidden email]
>>> Official list archives available at http://www.lassotalk.com
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>