close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Repeating tables - repeat by across columns rather than down rows

Thread began 7/05/2016 3:31 pm by iain331081 | Last modified 7/12/2016 2:55 pm by iain331081 | 99 views | 5 replies

Ray BorduinWebAssist

I think your div just needs to be inside your repeated selection so instead of:

php:
<?php if ($totalRows_WADAlodges 0) { // Show if recordset not empty ?>

    <?php do { ?>
      <div class="large-4 columns home_middle_borderless">
        <?php
        
// RepeatSelectionCounter_1384544914955 Begin Loop
        
$RepeatSelectionCounter_1384544914955_IterationsRemaining $RepeatSelectionCounter_1384544914955_Iterations;
        while(
$RepeatSelectionCounter_1384544914955_IterationsRemaining--){
        if(
$RepeatSelectionCounterBasedLooping_1384544914955 || $row_WADAlodges){
        
?>
        <br>
        <br>
        <table width="100%" border="1px">
          <tr>
            <td><img  src="../images/lodges/key_photos/<?php echo $row_WADAlodges['profile_key_photo']; ?>" alt="Key Photo" width="180px" height="144px"/></td>
          </tr>
          <tr>
            <td><h5><?php echo($row_WADAlodges['Lodge']); ?></h5></td>
          </tr>
        </table>
        <?php
        
// RepeatSelectionCounter_1384544914955 Begin Alternate Content
        
else{
        
?>
        <?php // RepeatSelectionCounter_1384544914955 End Alternate Content
        
if(!$RepeatSelectionCounterBasedLooping_1384544914955 && $RepeatSelectionCounter_1384544914955_IterationsRemaining != 0){
            if(!
$row_WADAlodges && $RepeatSelectionCounter_1384544914955_Iterations == -1){$RepeatSelectionCounter_1384544914955_IterationsRemaining 0;}
            
$row_WADAlodges mysql_fetch_assoc($WADAlodges);
        }
        
$RepeatSelectionCounter_1384544914955++;
        } 
// RepeatSelectionCounter_1384544914955 End Loop
        
?>
      </div>
      <?php } while ($row_WADAlodges mysql_fetch_assoc($WADAlodges)); ?>
    <?php // Show if recordset empty ?>



you would want something like:

php:
<?php if ($totalRows_WADAlodges 0) { // Show if recordset not empty ?>

    <?php do { ?>
        <?php
        
// RepeatSelectionCounter_1384544914955 Begin Loop
        
$RepeatSelectionCounter_1384544914955_IterationsRemaining $RepeatSelectionCounter_1384544914955_Iterations;
        while(
$RepeatSelectionCounter_1384544914955_IterationsRemaining--){
        if(
$RepeatSelectionCounterBasedLooping_1384544914955 || $row_WADAlodges){
        
?>
      <div class="large-4 columns home_middle_borderless">
        <br>
        <br>
        <table width="100%" border="1px">
          <tr>
            <td><img  src="../images/lodges/key_photos/<?php echo $row_WADAlodges['profile_key_photo']; ?>" alt="Key Photo" width="180px" height="144px"/></td>
          </tr>
          <tr>
            <td><h5><?php echo($row_WADAlodges['Lodge']); ?></h5></td>
          </tr>
        </table>
      </div>
        <?php
        
// RepeatSelectionCounter_1384544914955 Begin Alternate Content
        
else{
        
?>
        <?php // RepeatSelectionCounter_1384544914955 End Alternate Content
        
if(!$RepeatSelectionCounterBasedLooping_1384544914955 && $RepeatSelectionCounter_1384544914955_IterationsRemaining != 0){
            if(!
$row_WADAlodges && $RepeatSelectionCounter_1384544914955_Iterations == -1){$RepeatSelectionCounter_1384544914955_IterationsRemaining 0;}
            
$row_WADAlodges mysql_fetch_assoc($WADAlodges);
        }
        
$RepeatSelectionCounter_1384544914955++;
        } 
// RepeatSelectionCounter_1384544914955 End Loop
        
?>
      <?php } while ($row_WADAlodges mysql_fetch_assoc($WADAlodges)); ?>
    <?php // Show if recordset empty ?>



Really since you are using floated div tags you don't even need to use a repeated section. The repeat region would be enough like:

php:
<?php if ($totalRows_WADAlodges 0) { // Show if recordset not empty ?>

    <?php do { ?>
      <div class="large-4 columns home_middle_borderless">
        <br>
        <br>
        <table width="100%" border="1px">
          <tr>
            <td><img  src="../images/lodges/key_photos/<?php echo $row_WADAlodges['profile_key_photo']; ?>" alt="Key Photo" width="180px" height="144px"/></td>
          </tr>
          <tr>
            <td><h5><?php echo($row_WADAlodges['Lodge']); ?></h5></td>
          </tr>
        </table>
      </div>
      <?php } while ($row_WADAlodges mysql_fetch_assoc($WADAlodges)); ?>
    <?php // Show if recordset empty ?>



You only need repeat selection if you are actually repeating <td> tags or doing multiple inserts or updates.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...