close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

repeat region

Thread began 3/28/2013 1:35 pm by JamieEff | Last modified 3/28/2013 2:48 pm by Jason Byrnes | 843 views | 9 replies |

JamieEff

repeat region

not sure if this is the right forum, but have been bashing my head against a brick wall trying to figure out how to got the below as a repeat region....

html:
<div style="width:550px;">
<div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"><?php echo $row_StaffDetails['StaffName']; ?></li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<div style="width:570px;">
<div style="float:right; width:380px;"><?php echo $row_StaffDetails['StaffBio']; ?></div>
<div style="float:left;margin:0 10px 5px 0; padding:10px; border: 1px solid #23363C; background-color:#8D9252;">
<?php
if(TRUE){ // Begin Cached Resized Image: ImageCacheInstance_1364489458477
ob_start();
?>
<img src="uploads/images/staff-pics/<?php echo $row_StaffDetails['StaffPic']; ?>" width="150" height="150" />
<?php
echo(getCachedResizedImageHTML(ob_get_clean(), "uploads/images/staff-pics/", "crop", "", false));
} // End Cached Resized Image: ImageCacheInstance_1364489458477
?>
</div>
<div style="clear:left;">
<div>
<h2>My Qualifications:</h2>
</div>
<div style="font-size:12px;margin-left:-20px;width:190px;"><?php echo $row_StaffDetails['StaffQuals']; ?></div>
</div>
<div style="clear:both;"></div>
</div>
<div> </div>
</div>
</div>
</div>
</div>



Any help gratefully received!

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

select that code, then go to the server behaviors panel, click the plus button and select Repeat Region...

Sign in to reply to this post

JamieEff

I've tried that (amongst other things) and it sort of works but puts each entry on its own line rather than in the tabbed panel framework

Sign in to reply to this post

Jason ByrnesWebAssist

all right, well that gives a more complete picture of the actual problem, those details would have been helpful to know at the outset.


the repeat region should onbly go around the tab and contant group code, not the entire tabbed pannel

php:
<ul class="TabbedPanelsTabGroup">

            <li class="TabbedPanelsTab" tabindex="0"><?php echo $row_StaffDetails['StaffName']; ?></li>
          </ul>
          <div class="TabbedPanelsContentGroup">
            <div class="TabbedPanelsContent">
              <div style="width:570px;">
                <div style="float:right; width:380px;"><?php echo $row_StaffDetails['StaffBio']; ?></div>
                <div style="float:left;margin:0 10px 5px 0; padding:10px; border: 1px solid #23363C; background-color:#8D9252;">
                  <?php
if(TRUE){ // Begin Cached Resized Image: ImageCacheInstance_1364489458477
ob_start();
?>
                    <img  src="uploads/images/staff-pics/<?php echo $row_StaffDetails['StaffPic']; ?>" width="150" height="150" />
                    <?php
echo(getCachedResizedImageHTML(ob_get_clean(), "uploads/images/staff-pics/""crop"""false));
// End Cached Resized Image: ImageCacheInstance_1364489458477
?>
                </div>
                <div style="clear:left;">
                  <div>
                    <h2>My Qualifications:</h2>
                  </div>
                  <div style="font-size:12px;margin-left:-20px;width:190px;"><?php echo $row_StaffDetails['StaffQuals']; ?></div>
                </div>
                <div style="clear:both;"></div>
              </div>
              <div> </div>
            </div>
          </div>
Sign in to reply to this post

JamieEff

have tried that already as well :(

Sign in to reply to this post

Jason ByrnesWebAssist

ok, there needs to be 2 repeat regions, one around the tab LI elements and another around the tab content div.


here is a simplistic dynamic tab panels example i created:

php:
<div id="TabbedPanels1" class="TabbedPanels">

  <ul class="TabbedPanelsTabGroup">
    <?php do { ?>
      <li class="TabbedPanelsTab" tabindex="0"><?php echo $row_recordsetName['columnName']; ?></li>
      <?php } while ($row_recordsetName mysql_fetch_assoc($recordsetName)); ?>
  </ul>
  <div class="TabbedPanelsContentGroup">
    <?php
    mysql_data_seek
($recordsetName0);
    
$row_recordsetName mysql_fetch_assoc($recordsetName);
    
?>
    <?php do { ?>
    <div class="TabbedPanelsContent"><?php echo $row_recordsetName['columnName']; ?></div>
    <?php } while ($row_recordsetName mysql_fetch_assoc($recordsetName)); ?>
</div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>




note that before the second repeat region, i reset the recordset using this code:
<?php
mysql_data_seek($recordsetName, 0);
$row_recordsetName = mysql_fetch_assoc($recordsetName);
?>

Sign in to reply to this post

JamieEff

thanks Jason

I didnt have

php:
<?php 
    mysql_data_seek
($recordsetName0); 
    
$row_recordsetName mysql_fetch_assoc($recordsetName); 
    
?>


so guess thats where I was going wrong with the 2nd repeat region...

Sign in to reply to this post

Jason ByrnesWebAssist

yeah, if you don't reset the recordset to the beginning, the 2nd repeat wont work, the recordset will be stuck at the end, nothing to repeat from there.

Sign in to reply to this post

JamieEff

good to know and remember for the future :D

Sign in to reply to this post

Jason ByrnesWebAssist

There is a behavior for this in Data Bridge:

on the server behaviors panel:

Click the plus button and select WebAssist -> Dynamic WebCharts -> reset to First Record

Sign in to reply to this post
loading

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...