1
FYI_Geek
After 6 BD results make a new line?
  • 2010/8/15 17:46

  • FYI_Geek

  • Just popping in

  • Posts: 2

  • Since: 2010/8/15


Hello all i am new, i have an isse i have been fighting with lol.
I am trying to make my results so it appears in 3 rows 6 colloms in each row. But it keeps coming out all in one I want it to appear like:

Row 1 [6 results] [IMG] [IMG] [IMG] [IMG] [IMG] [IMG]
Row 2 [6 results] [IMG] [IMG] [IMG] [IMG] [IMG] [IMG]
Row 3 [6 results] [IMG] then it will stop here at row 3.

This is what i have so far, i can get the photos to appear in sets of 6 but the cell below still groups...
I updaged the code, and it does the new line after 6 results but the name is repeated and not aligned?

[
code]{if $brows}<tr>
  <
td colspan="10" height="5">td>
  tr>
  
    <
tr>{assign var=i value=0}
      {foreach 
item=row from=$brows limit=18 name="top_row"}{assign var=i value=$i+1
        <
td class="featuredImg"><img src="../uploads/thumbs/{$row.photo_thumb}width="110" height="90" border="0" />td>
        {if 
$smarty.foreach.top_row.last == false}
          <
td width="20" rowspan="2">&nbsp;td>
        {/if}
        {if 
$i 6 eq 0 and $i neq 0tr>
    <
tr>
      {foreach 
item=row from=$brows}
        <
td class="mainImagetext"><form action="./photo_galla_overview.php?view=Featured" method="post"><input name="viewp" type="submit" value="{$row.photo_title}, by {$row.photo_author}class="submit_butsmlx"  /><input name="action" type="hidden" value="{$row.id}/>form>td>
{/foreach}
    tr>
    <
tr>
      <
td height="12">&nbsp;td>
      <
td>&nbsp;td>
    tr>
    {/if}{/foreach} 
{/if}


Any help would be great i know i am overlooking something lol.

2
ghia
Re: After 6 BD results make a new line?
  • 2010/8/15 19:58

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Check out this example.

3
FYI_Geek
Re: After 6 BD results make a new line?
  • 2010/8/15 20:15

  • FYI_Geek

  • Just popping in

  • Posts: 2

  • Since: 2010/8/15


I looked it over but the code in the head is working and set up to assing to smarty already i don't use the echo "" feature.

What i need is a way to make it work in the {foreach} part.
I might just have to go to a more simple layout i guess which sucks. but thanks

4
ghia
Re: After 6 BD results make a new line?
  • 2010/8/16 0:37

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Sorry, I overlooked that it was Smarty.
But you are not using XOOPS, are you?

Login

Who's Online

312 user(s) are online (214 user(s) are browsing Support Forums)


Members: 0


Guests: 312


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits