Categories > TinyButStrong general >

Paralell or Serial candidate

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Martin
Date: 2014-02-12
Time: 10:14

Paralell or Serial candidate

Hi Skrol29!! How many years working with TBS (2005 - 2014) :)

I think this code is better to make with parallel than with serial, but i need a little help.
I want to repeat just "<li>.....</li>" with the same count of data in each block. Using serial works
but make me <div class="row">...</div> every two records. I guess with serial is posible .. making
serial with ((div)) or (li+div). Of course i can use array_slice to make 2 arrays and merge one each <ul>

That do you think ? Make it in old way or .....

<div class="row">
  <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
    <ul class="list-unstyled">
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
    </ul>
  </div>
  <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
    <ul class="list-unstyled">
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
      <li><a class="text-lg" href="#" title="">Country name</a> <span class=""><small>1345 guesthouses</small></span></li>
    </ul>
  </div>
</div>

Thank You !!!
By: Skrol29
Date: 2014-02-12
Time: 10:36

Re: Paralell or Serial candidate

Hi Martin,

I cannot see clearly what you re trying to have.

You only want to repeat <li> ? Or do you have also to repeat <div> or <ul> ?
The two <ul> are about the same columns of different columns ?
By: Martin
Date: 2014-02-12
Time: 11:16

Re: Paralell or Serial candidate

Hi Skrol29,

Let me show you the result of code: https://www.dropbox.com/s/jl6zjrf5e3gaiww/Skrol29.jpg

Let me know if you can see it, or i will upload to another server.

I know you remove the donate button ... Let me show u a little numbers of TBS Power 16.955.122 pages make it all with TBS

https://www.dropbox.com/s/nzfk6oxt8k87mz1/Skrol29Power.jpg

Good Work !!
By: Skrol29
Date: 2014-02-12
Time: 12:01

Re: Paralell or Serial candidate

Yes I can see the result. Thanks.

the problem is different depending to the order of displaying data :

(1)
Country A | Country B
Country C | Country D
Country E | Country F

(2)
Country A | Country D
Country B | Country E
Country C | Country F

For (1) you have to use parameter "serial". You can easily increase the number of columns dynamically before to merge data.

For (2) you need to use parameter "parentgrp" to break to another column, but this need a prepared information in the data saying the column reference (number, id, whatever...).
Then TBS will put a new column each time this information changes.

> Let me show u a little numbers of TBS Power 16.955.122 pages make it all with TBS

Great ! Thank for sharing this.
By: Sheepy
Date: 2014-02-14
Time: 11:39

Re: Paralell or Serial candidate

When I need to do (1), I'll set item width to half container width and make the items flow left.

When I need to do (2), I'll use CSS3 columns and tells the client that supporting old browsers will cost extra.

This way the tags and merging is simple, it is always a simple list, and the layout remains flexible (e.g. easy to change back to single column or three columns - it's all CSS).