Repeat Region on Hortizonal Looper

My last post I got great help on getting my records to show horizontally , the only issue now that I've come across now is :
How do I get the regions to show 3 record per page , as of now it shows all records per page even with a repeat region set to 3 records set per page
Here is part of the code that I referred off of from other examples, which is currently working minus the repeat region. Also just like to point out that Most of the code is auto generated in dreamweaver so I just use the CF buttons button to generate it all then just edited the code accordingly.
Where would I set the # of products to show up
I also noticed this in a bit of code was in the example provided : <td>#arraysum(yourquery["lotsin"])#</td>  not sure if that is relevant...
<td>Products</td>
  </tr>
<cfoutput query="RsProdSurf" startRow="#StartRow_RsProdSurf#" maxRows="#MaxRows_RsProdSurf#">
  <table width="200" border="1" align="center">
    <tr>
      <cfloop query="RsProdSurf">
        <td>#RsProdSurf.Products#</td>
      </cfloop>
    </tr>
The nex/prev paging
<tr>
      <td><cfif PageNum_RsProdSurf GT 1>
        <a href="#CurrentPage#?PageNum_RsProdSurf=1#QueryString_RsProdSurf#">First</a>
      </cfif></td>
      <td><cfif PageNum_RsProdSurf GT 1>
        <a href="#CurrentPage#?PageNum_RsProdSurf=#Max(DecrementValue(PageNum_RsProdSurf),1)##QueryS tring_RsProdSurf#">Previous</a>
      </cfif></td>
      <td><cfif PageNum_RsProdSurf LT TotalPages_RsProdSurf>
        <a href="#CurrentPage#?PageNum_RsProdSurf=#Min(IncrementValue(PageNum_RsProdSurf),TotalPages _RsProdSurf)##QueryString_RsProdSurf#">Next</a>
      </cfif></td>
      <td><cfif PageNum_RsProdSurf LT TotalPages_RsProdSurf>
        <a href="#CurrentPage#?PageNum_RsProdSurf=#TotalPages_RsProdSurf##QueryString_RsProdSurf#">L ast</a>
      </cfif></td>
    </tr>
  </cfoutput>
Once again thanks alot guys, I really do appreciate the help with this , It's been driving me nuts and I must figure it out!!
D

Here is a screenshot of what I would like to try and do,
I would like 4/5 to NOT show up and have a next page for them
Here is what happens when I add the repeat region from dreamweaver, it seems to repeat it but not the right way
Really confused on this , Hoping somebody can solve this !!!
Thanks D

Similar Messages

  • How can I use a Looper inside a Repeat Region?

    I have a Dreamweaver standard Repeat Region applied to a HTML table containing two horizontal loopers. The HTML table is to display a list of company contacts for our members. The loopers display find for the first company but after that they stop. To key the loopers to the company Im using a trick mentioned by Günter Schenk in this thread: http://www.adobeforums.com/webx/.59b524b4/5. He calls it a sub query; at times I use to help myself by using some sort of "sub query" like the following
    <br />
    <br />Ive linked my looper recordset to the recordset used for the Repeat Region. Heres one of the looper queries:
    <br />
    <br />$KTColParam1_rsContactFeatures = "-1";
    <br />if (isset($_SESSION["kt_login_id"])) {
    <br />$KTColParam1_rsContactFeatures = $_SESSION["kt_login_id"];
    <br />}
    <br />mysql_select_db($database_RNW, $RNW);
    <br />$query_rsContactFeatures = sprintf("SELECT DISTINCT list_feature.description_feature, company.id_company, contact_cnt.idpremissions_cnt FROM (((company LEFT JOIN company_to_feature ON company_to_feature.idcompany=company.id_company) RIGHT JOIN list_feature ON list_feature.id_list_feature=company_to_feature.idlistfeature) LEFT JOIN contact_cnt ON contact_cnt.idcompany_cnt=company.id_company) WHERE company.id_company='".$row_rsContactAll['id_company']."' AND company_to_feature.id_feature is not null AND contact_cnt.idpremissions_cnt=%s ORDER BY company.id_company ASC ", GetSQLValueString($KTColParam1_rsContactFeatures, "int"));
    <br />$rsContactFeatures = mysql_query($query_rsContactFeatures, $RNW) or die(mysql_error());
    <br />$row_rsContactFeatures = mysql_fetch_assoc($rsContactFeatures);
    <br />$totalRows_rsContactFeatures = mysql_num_rows($rsContactFeatures);
    <br />
    <br />This is my link in both quires: WHERE company.id_company='".$row_rsContactAll['id_company']."'
    <br />
    <br />Heres the code for the connected looper:
    <br />
    <br /><?php<br />do { // horizontal looper version 3<br />?>
    <br />
    <br />
    <br />
    <br />
    <br />As I said this works fine for the first item in the list but then it quits. Heres a screen shot of what I dont want: http://www.retirenw.com/images/help/looper_inside_repeat_region.gif
    <br />
    <br />Is there anyway to change the php for the loopers to make this work?
    <br />
    <br />Thanks for your help
    <table>
    <tr>
    <td>
    <img src="../images/bullet.gif" width="8" height="14" />
    </td>
    <td>
    <?php echo $row_rsContactFeatures['description_feature']; ?>
    </td><?php <br />$row_rsContactFeatures = mysql_fetch_assoc($rsContactFeatures);<br />if (!isset($nested_rsContactFeatures)) { <br />$nested_rsContactFeatures= 1;<br />}<br />if (isset($row_rsContactFeatures) && is_array($row_rsContactFeatures) && $nested_rsContactFeatures++ % 1==0) {<br />echo "</tr><tr>";<br />}<br />} while ($row_rsContactFeatures); //end horizontal looper version 3<br />?>
    </tr>
    </table>

    I found an easy solution.
    I moved my looper quires out of my head and into my bodyinside the repeat region (the Looper Wizard puts the quires in the head). I put the quires right before my looper code. Finally, I had to make sure my conditional regional code came after the looper quires but before the looper code.

  • Nested Repeat Regions in Dreamweaver 8

    I am waying the option of upgrading from MX to 8 or just
    getting MX Looper to do nested repeat regions. Any advice? Are
    nested repeat regions built into Dreamweaver 8?

    SmellyPete wrote:
    > I've got a problem with nested templates in my site. I
    don't think it's an
    > error or bug as such, just a really strange limitation,
    that I hope there is a
    > work around for.
    >
    > I've setup a menubar with a repeating table region in a
    template. Then I laid
    > out the content (editable) regions in a nested template.
    The system works
    > really well in dreamweaver, if you want to add a menu
    item, you do so to the
    > parent template, and then it filters through out the
    site.
    >
    > The problem is that when I try to edit the pages as a
    client with contribute
    > (even as an administrator) it will not allow access to
    edit a .dwt file, even
    > if it has editable regions in it. This means I can't use
    contribute to add an
    > item to the menubar, because I need to be able to edit
    the nested template. I'm
    > sure it's possible, because a .dwt is just an .htm file
    with a different hat on.
    >
    > There must be some way of doing this. As soon as I read
    about the template
    > system I immediately thought this would be one of it's
    strengths, and would be
    > very surprised if the contribute user were limited to
    making changes on every
    > individual page.
    >
    > PS. I'm sure someone will suggest that I just move the
    repeating region into
    > the nested template. I could do this, but the whole
    point is that with one
    > change I want it to will filter down through the whole
    site. I thought maybe
    > SSI might be the answer, but would that just confuse
    contribute even more?
    >
    It seems to me the whole point of using Contribute is to keep
    users from
    changing basic site configurations such as the menu. Use
    Dreamweaver or
    one of the simple HTML editors around.

  • PDF Template (repeating regions) correct version of Adobe Acrobat

    Hi,
    I want to build a PDF template for a Payslip I am knocking up at the moment and have come to the conclusion this may be easier as a PDF template rather than an RTF template.
    The reason being I have multiple repeating regions in the payslip (earnings, deductions, salary history, payments) all of which could overflow onto another sheet of stationary when the job is run. If you think RTF is a better solution please post and let me know how I should achieve this. Or indeed if you think PDF is wrong also please let me know.
    So I want to build a PDF template to utilise its overflow handling but what version of Adobe acrobat do I then need? 9 is the current release and there is a "Standard", "Pro" and "Pro-Extended" version of the software each with escalating costs associated. I see in Tim's blog the PDF has to be in the 1.4 specification which all the versions since 5 seem to support.
    If you need anymore info in order to please let me know.
    Cheers
    Doug

    Agreed RTF is a lot simpler to create and maintain.
    I cannot seem to get my RTF template to behave with overflowing properties my basic design is Below (excuse the odd way of displaying it but I'm sure you get the idea). So any 1 of 4 repeating groups could go over their limits (I have currently hardcoded the loop limit in the group). I need the basic Emp info the Address info and the random info on each sheet.
    I've been around the forum and all over the net (Anil Passi's site, XML/BI Publisher Blog etc.) looking at the solutions people have used for invoices and PO's but I cannot seem to use them in my case.
    Any help you or anyone else could give on the subject would be gratefully received.
    ************************* Basic Emp info *************************
    ****Earnings Repeating Group***** ****Deductions Repeating Group*******
    ************************* Total Info *************************
    *****Payments Repeating Group**** *****Salary Repeating Group *****
    More random info ..
    More random info ..
    More random info ..
    More random info ..
    ********************Address and Postal Info***********************
    Cheers
    Doug

  • Limiting Number of Rows in spry:repeat Region

    With the code...
    <tr spry:repeat="dsTitles">
    <td width="60%">{title}</td>
    <td width="14%">{author}</td>
    <td width="9%">{date}</td>
    </tr>
    ... How do I limit the number of rows that will be displayed
    in this repeat region
    to just 5, instead of displaying all 25 rows stored in the
    XMLDataSet (dsTitles)?
    Thanks!
    Oscar

    Hey Oscar,
    Glad that works for you.
    Kin and I were thinking that {ds_RowNumber} might be better
    for that particular looping, but you get the idea.
    http://labs.adobe.com/technologies/spry/articles/data_set_overview/index.html
    That was our first overview doc and it was definitive at the
    time. We no longer update it but it's a good intro to Spry.
    You can find the built in data references in that doc,
    granted almost at the very bottom.
    The API doc
    http://labs.adobe.com/technologies/spry/articles/data_api/index.html
    is a good start but we still have a lot to add to it. I have
    plans for it for sure.
    We are doing a big push for 1.6 towards progressive
    enhancement, unobtrusive js and things like that.
    Expect docs and samples and some cool utilities to come out
    this summer and for 1.6.
    And we won't charge for it, but we also won't return any
    cash-laden envelopes... ;)
    Let us know how to improve any part of Spry.
    Thanks,
    Don

  • Sum a field in repeat region

    Hi There,
    I am trying to sum a field in a repeat region.
    That is, the repeat region displays on page as per normal but then have a total field based on the sub total fields stored in the data base for each record.
    Any help is appreciated.
    Cheers

    Here's a quick idea of how to do it in CF. If you use PHP the principle would be the same.
    <cfset ThisRowTotal = 0 >
    <cfloop query="getPageLinks">
      <cfset ThisRowTotal = ThisRowTotal + YourSubTotalVariable>
        <cfoutput>#ThisRowTotal#<cfoutput>
    </cfloop>
    That's how it would look, what it is doing is each loop it is adding that loop's subtotal to the "ThisRowTotal" variable, then outputting it, so each loop will show the cumulative sub total.
    Hope this helps.
    Lawrence Cramer - *Adobe Community Professional*
    http://www.Cartweaver.com
    Shopping Cart for Adobe Dreamweaver
    available in PHP, ColdFusion, and ASP
    Stay updated - http://blog.cartweaver.com

  • Assigning "position" in repeat region

    I have a site that runs a contest and displays winners from
    across the
    nation. Through the year they compete and can go online to
    see where they
    stand in relation to others in their same territory. In order
    to display
    the winner's positions on the page, I sort the underlying
    data in sql using
    the necessary criteria, then on my asp page, as part of the
    repeat region, I
    run code that loops through the recordset and uses an x+1
    method of
    displaying each person's position. Whether or not this is the
    best way to
    do this, it works.
    MY PROBLEM...
    Up until now I only needed to display the positions based on
    one selected
    territory. So my results would always simply show 1 -x, in
    order.
    Joe territory1 1
    Van territory1 2
    Tim territory1 3
    Bob territory1 4
    NOW I am being asked to show the entire nation on one page
    for
    administrators. They want to see ALL the territories and the
    positions of
    each person for each territory, and have the ability to sort
    based on
    various columns. So now my "positions" column will have
    several people in
    1st position, several in 2nd, etc.
    Joe territory1 1
    Jen territory2 1
    Van territory1 2
    Sue territory2 2
    Tim territory1 3
    Len territory2 3
    Bob territory1 4
    Ken territory2 4
    I'm not sure how to go about this, and would greatly
    appreciate any advice!

    In the actual case the criteria for winning is that 1) ALL
    criteria are met
    (there are actually four of them, not two as shown in my
    example), and then
    2) you have the highest perentage.
    So in the case below, remembering that each territory has its
    own set of
    winners, it would look like this (if sorted by winning
    position - keeping in
    mind that I need to allow sorting on ANY column by the user):
    name territory Criteria_A Criteria_B Criteria_C POS
    Bob 1 74% Y Y
    1
    Tim 1 42% Y Y
    2
    Van 1 25% Y Y
    3
    Len 2 66% N Y
    1
    Sue 2 56% N Y
    2
    Joe 1 43% Y N
    4
    Ken 2 82% N N
    3
    Jen 2 68% N N
    4
    Here you can see that Bob, Tim, and Van all have Y for both
    their B & C
    criteria, so they are sorted to the top (how I do that is
    somewhat secondary
    at this point -- you can just assume that Y=10 and N=0 and
    I'll sort on the
    sum of those columns).
    Then Len, Sue, and Joe each have one Y and one N, so they are
    grouped
    together based on that, then sorted by percent. Note that Joe
    has a
    position of 4 because he is in Territory 1.
    Lastly, Ken and Jen have "N" for both criteria, so they are
    sorted last, and
    then by their percentage.
    I put a dashed line in there as a visual aid -- doesn't need
    to be in my
    results.
    "Pizza Good" <[email protected]> wrote in message
    news:[email protected]...
    > Hmm...interesting.
    >
    > In the sample data below, can you please sort them how
    you want them to
    > appear? I want to see how you handle the Y's and N's.
    >
    >
    > "HX" <[email protected]> wrote in message
    > news:[email protected]...
    >> Because "position" isn't a field in the database -
    it's determined based
    >> on sorting the list on various criteria. For
    example, let's say the
    >> winner for each territory will have met all of
    criteria_B and _C and then
    >> will have the highest % in criteria_A . All I have
    in my database is:
    >>
    >> name territory Criteria_A Criteria_B Criteria_C
    >> Joe 1 43% Y N
    >> Jen 2 68% N N
    >> Van 1 25% Y Y
    >> Sue 2 56% N Y
    >> Tim 1 42% Y Y
    >> Len 2 66% N Y
    >> Bob 1 74% Y Y
    >> Ken 2 82% N N
    >>
    >> For Territory 1 I can pull out those names, sort
    based on my criteria,
    >> then loop in my repeat region and assign their
    positions right there in
    >> the asp.
    >>
    >> But when I combine ALL of them onto one page, I
    can't do that.
    >>
    >> Is there some way to set those positions in the
    sub-query (for each
    >> territory) and reference that field in a 2nd query?
    >>
    >>
    >>
    >>
    >> "Pizza Good" <[email protected]> wrote
    in message
    >> news:[email protected]...
    >>> Why not just sort by both fields?
    >>>
    >>> Not sure what your fields are called so I will
    use:
    >>>
    >>> territory
    >>> position
    >>>
    >>> ORDER BY territory ASC, position ASC
    >>>
    >>>
    >>>
    >>>
    >>> "HX" <[email protected]> wrote in
    message
    >>> news:[email protected]...
    >>>>I have a site that runs a contest and
    displays winners from across the
    >>>>nation. Through the year they compete and can
    go online to see where
    >>>>they stand in relation to others in their
    same territory. In order to
    >>>>display the winner's positions on the page, I
    sort the underlying data
    >>>>in sql using the necessary criteria, then on
    my asp page, as part of the
    >>>>repeat region, I run code that loops through
    the recordset and uses an
    >>>>x+1 method of displaying each person's
    position. Whether or not this is
    >>>>the best way to do this, it works.
    >>>>
    >>>> MY PROBLEM...
    >>>>
    >>>> Up until now I only needed to display the
    positions based on one
    >>>> selected territory. So my results would
    always simply show 1 -x, in
    >>>> order.
    >>>>
    >>>> Joe territory1 1
    >>>> Van territory1 2
    >>>> Tim territory1 3
    >>>> Bob territory1 4
    >>>>
    >>>> NOW I am being asked to show the entire
    nation on one page for
    >>>> administrators. They want to see ALL the
    territories and the positions
    >>>> of each person for each territory, and have
    the ability to sort based
    >>>> on various columns. So now my "positions"
    column will have several
    >>>> people in 1st position, several in 2nd, etc.
    >>>>
    >>>> Joe territory1 1
    >>>> Jen territory2 1
    >>>> Van territory1 2
    >>>> Sue territory2 2
    >>>> Tim territory1 3
    >>>> Len territory2 3
    >>>> Bob territory1 4
    >>>> Ken territory2 4
    >>>>
    >>>> I'm not sure how to go about this, and would
    greatly appreciate any
    >>>> advice!
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >>
    >>
    >
    >

  • Nested Repeat Region

    Dreamweaver CS3
    ASP / VBScript
    Hi,
    I'm trying to create a nested repeat region to display a list
    of categories
    and, in brackets afterwards, a count of the number of
    sub-categories
    contained in it E.g.
    Cats (12)
    Dogs (43)
    Fish (92)
    Etc
    I have managed to create my repeat region ok because as soon
    as I drop a
    field in from the recordset, it loops through them all and
    displays them
    correctly. However, when I try and simply write out the total
    number of
    records found, it doesn't display anything.
    Recordset 1 is a straighforward select from the table.
    Recordset 2 adds a
    WHERE clause usinga variable based on the 1st recordset. Here
    is the code
    i'm using for the 2 recordsets:
    Recordset 1 :
    <%
    Dim Level1
    Dim Level1_cmd
    Dim Level1_numRows
    Set Level1_cmd = Server.CreateObject ("ADODB.Command")
    Level1_cmd.ActiveConnection = MM_SemiDirectory_STRING
    Level1_cmd.CommandText = "SELECT * FROM TBL_Level1 ORDER BY
    [Description]
    ASC"
    Level1_cmd.Prepared = true
    Set Level1 = Level1_cmd.Execute
    Level1_numRows = 0
    %>
    Recordset 2 :
    <%
    Dim Level2__varLink
    Level2__varLink = "1"
    If (level1.fields.item("Level1_ID").value <> "") Then
    Level2__varLink = level1.fields.item("Level1_ID").value
    End If
    %>
    <%
    Dim Level2
    Dim Level2_cmd
    Dim Level2_numRows
    Set Level2_cmd = Server.CreateObject ("ADODB.Command")
    Level2_cmd.ActiveConnection = MM_SemiDirectory_STRING
    Level2_cmd.CommandText = "SELECT * FROM TBL_Level2 WHERE
    Level1_ID = ? ORDER
    BY Level1_ID ASC"
    Level2_cmd.Prepared = true
    Level2_cmd.Parameters.Append
    Level2_cmd.CreateParameter("param1", 5, 1, -1,
    Level2__varLink) ' adDouble
    Set Level2 = Level2_cmd.Execute
    Level2_numRows = 0
    %>
    Now for the repeated code :
    <%
    While ((Repeat1__numRows <> 0) AND (NOT Level1.EOF))
    %>
    <li><a
    href="category.asp?level1=<%=(Level1.Fields.Item("Level1_ID").Value)%>"><%=(Level1.Fields .Item("Description").Value)%>
    (<%=(Level2_total)%>)
    </li></a>
    <%
    Repeat1__index=Repeat1__index+1
    Repeat1__numRows=Repeat1__numRows-1
    Level1.MoveNext()
    Wend
    %>
    Can anyone tell me what I need to do to this code to make it
    display the
    number of sub-categories?
    Thanks!!!

    Ok folks,
    I found a way to get what I want. It's not pretty as I had to
    make an extra
    query in the database (that select of the count of all child
    table results
    for each parent category) and am pulling from that but it
    works and that's
    the main thing. I'm sure there is a more effective way of
    doing it but
    that's life!
    I'm still interested in knowing the 'proper' way (if there is
    such a thing)
    so if you have the time to show me, i'm all ears!
    Cheers!
    "Mintyman" <[email protected]> wrote in message
    news:[email protected]...
    > Ok,
    >
    > So I closed the <li> code before the <a>
    code. D'oh!
    >
    > Anyway, it returns a number now........the problem now
    is that it returns
    > the same value for each parent repeat!!!
    >
    > "Mintyman" <[email protected]> wrote in message
    > news:[email protected]...
    >> Dreamweaver CS3
    >> ASP / VBScript
    >>
    >> Hi,
    >>
    >> I'm trying to create a nested repeat region to
    display a list of
    >> categories and, in brackets afterwards, a count of
    the number of
    >> sub-categories contained in it E.g.
    >>
    >> Cats (12)
    >> Dogs (43)
    >> Fish (92)
    >> Etc
    >>
    >> I have managed to create my repeat region ok because
    as soon as I drop a
    >> field in from the recordset, it loops through them
    all and displays them
    >> correctly. However, when I try and simply write out
    the total number of
    >> records found, it doesn't display anything.
    >>
    >> Recordset 1 is a straighforward select from the
    table. Recordset 2 adds a
    >> WHERE clause usinga variable based on the 1st
    recordset. Here is the
    >> code i'm using for the 2 recordsets:
    >>
    >> Recordset 1 :
    >>
    >> <%
    >> Dim Level1
    >> Dim Level1_cmd
    >> Dim Level1_numRows
    >>
    >> Set Level1_cmd = Server.CreateObject
    ("ADODB.Command")
    >> Level1_cmd.ActiveConnection =
    MM_SemiDirectory_STRING
    >> Level1_cmd.CommandText = "SELECT * FROM TBL_Level1
    ORDER BY [Description]
    >> ASC"
    >> Level1_cmd.Prepared = true
    >>
    >> Set Level1 = Level1_cmd.Execute
    >> Level1_numRows = 0
    >> %>
    >>
    >> Recordset 2 :
    >>
    >> <%
    >> Dim Level2__varLink
    >> Level2__varLink = "1"
    >> If (level1.fields.item("Level1_ID").value <>
    "") Then
    >> Level2__varLink =
    level1.fields.item("Level1_ID").value
    >> End If
    >> %>
    >> <%
    >> Dim Level2
    >> Dim Level2_cmd
    >> Dim Level2_numRows
    >>
    >> Set Level2_cmd = Server.CreateObject
    ("ADODB.Command")
    >> Level2_cmd.ActiveConnection =
    MM_SemiDirectory_STRING
    >> Level2_cmd.CommandText = "SELECT * FROM TBL_Level2
    WHERE Level1_ID = ?
    >> ORDER BY Level1_ID ASC"
    >> Level2_cmd.Prepared = true
    >> Level2_cmd.Parameters.Append
    Level2_cmd.CreateParameter("param1", 5,
    >> 1, -1, Level2__varLink) ' adDouble
    >>
    >> Set Level2 = Level2_cmd.Execute
    >> Level2_numRows = 0
    >> %>
    >>
    >>
    >> Now for the repeated code :
    >>
    >>
    >> <%
    >> While ((Repeat1__numRows <> 0) AND (NOT
    Level1.EOF))
    >> %>
    >> <li><a
    >>
    href="category.asp?level1=<%=(Level1.Fields.Item("Level1_ID").Value)%>"><%=(Level1.Fields .Item("Description").Value)%>
    >> (<%=(Level2_total)%>)
    >> </li></a>
    >>
    >>
    >> <%
    >> Repeat1__index=Repeat1__index+1
    >> Repeat1__numRows=Repeat1__numRows-1
    >> Level1.MoveNext()
    >> Wend
    >> %>
    >>
    >> Can anyone tell me what I need to do to this code to
    make it display the
    >> number of sub-categories?
    >>
    >> Thanks!!!
    >>
    >>
    >>
    >
    >

  • Shorten the length of a repeat region

    I am trying to figure out how to shorten the length of the
    <li> in my repeat region. I want to limit each <li> to
    display no more than 40 characters in length on the web page.
    In the head of my page:
    <script type="text/javascript">
    <!--
    var dsFeedArticles = new
    Spry.Data.XMLDataSet("../feed/feeds/dailyfeed.xml",
    "rss/channel/item/article");
    -->
    </script>
    I have the following code in my repeat region:
    <ul spry:repeatchildren="dsFeedArticles>
    <li class="text">{dsFeedArticles::article}</li>
    </ul>
    I've looked at possibly a substring function but am confused
    to how to implement it. Any ideas? Any assistance would be
    appreciated.
    Regards,
    Michael

    Arnout,
    Regret the delay. My code is behind an intranet firewall, but
    pasted below is the bulk of my code. Any help would be greatly
    appreciated.
    Regards,
    Michael
    CODE BELOW:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title></title>
    <!--links for css and js-->
    <link href="css/main.css" rel="stylesheet" type="text/css"
    />
    <link href="css/blockmenu.css" rel="stylesheet"
    type="text/css" />
    <link href="..css/print.css" rel="stylesheet"
    type="text/css" media="print" />
    <script src="js/switchcontent.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="../SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsFeed = new
    Spry.Data.XMLDataSet("../feeds/dailyfeed.xml",
    "rss/channel/item",{sortOnLoad:"article",sortOrderOnLoad:"descending"});
    var dsFeedArticles = new
    Spry.Data.XMLDataSet("../feeds/dailyfeed.xml",
    "rss/channel/item/article");
    dsFeedArticles.addObserver(addTeaserColumn);
    function addTeaserColumn(notificationType, notifier, data)
    if(notificationType != "onPostLoad")
    return;
    //Get the unfiltered set of rows from the data set
    var rows=notifier.getData(true);
    var numRows = rows.length;
    // Now loop over every row generate a teaser column
    for (var i=0; i < numRows; i++)
    //Check the length of the entity decoded version of the desc
    column, because we don't want to factor in the length of entity
    encoded character names in our length check
    var row = rows[ i ];
    var desc = row[ "desc" ];
    var decodedDesc = Spry.Utils.decodeEntities(desc);
    if (decodedDesc.length > 20)
    row[ "teaser" ] =
    Spry.Utils.encodeEntities(decodedDesc.substring(1,20) + "...");
    else
    row[ "teaser" ] = desc;
    //-->
    </script>
    </head>
    <body>
    <!--END LEFT NAVIGATION-->
    <!--BEGIN MAIN TEXT SECTION-->
    <div id="bodysection">
    <div class="summarytitle">
    <!-- #BeginDate format:Am1 -->November 10, 2008<!--
    #EndDate -->
    </div>
    <!--date/time is automated, if date is not correct check
    your system clock-->
    <div id="oneproduct" style="border-bottom:#CCCCCC thin
    solid; padding-bottom:5px; ">
    <div spry:detailregion="dsFeed dsFeedArticles">
    <p><a href="{link}" class="producttitle">
    {title} {classification} <span
    class="datestamp">{feedDate}</span></a>
    <ul spry:repeatchildren="dsFeedArticles">{teaser}
    <li class="text" style="list-style-type:none; margin:0px
    0 -7px -40px;">{dsFeedArticles::article} </li>
    </ul>
    </div>
    </div>
    <!--END MAIN CONTENT-->
    </body>
    </html>

  • PHP help with nested repeat region

    Hopefully someone can help me out with this one.
    I basically have some SQL returning results of a search page,
    where you can search on various keywords by checking boxes, and it
    returns Employers that match those keywords :
    mysql_select_db($database_myDatabase, $myDatabase);
    if (isset($_GET['ckbox'])){
    // get profile keys
    $ckbox = array_keys($_GET['ckbox']);
    // sql string
    $sql = 'SELECT Employers.*, EmployerContacts.* FROM
    EmployerContacts
    INNER JOIN Employers ON EmployerContacts.EmployerID =
    Employers.EmployerID
    INNER JOIN EmployerProfiles ON EmployerProfiles.EmployerID =
    EmployerContacts.EmployerID
    WHERE EmployerProfiles.ProfileID IN(' . implode(',',
    $ckbox).')
    GROUP BY Employers.EmployerID
    ORDER BY Employers.EmployerID DESC';
    $rsContacts = mysql_query($sql) or die(mysql_error());
    $row_rsContacts = mysql_fetch_assoc($rsContacts);
    @$totalRows = mysql_num_rows($rsContacts);
    else
    echo 'You did not check any profiles.';
    ?>
    The results are drawing fields from the Employers table and
    EmployerContacts table, hopefully to look like :
    Employer1
    Employer1.Contact 1
    Employer1.Contact 2
    Employer1.Contact 3
    Employer2
    Employer2.Contact 1
    Employer2.Contact 2
    Employer2.Contact 3
    etc
    However, I can only seem to get it to repeat the Employers,
    and show just the first Contact for each, like this :
    Employer1
    Employer1.Contact 1
    Employer2
    Employer2.Contact 1
    etc
    So I guess I'm looking for help with looping through the
    Contacts for each Employer.
    The code currently looks like this :
    [code attached]
    Hope that makes sense.
    Many thanks.

    Iain71,
    The DW Repeat Region cannot be nested because both loops use
    the same
    variable names (e.g. $RepeatSelectionCounter_1).
    You will have to manually edit the code, and DW may not
    recognize it
    after you do, but you should be able to get it working fairly
    easily. I
    think that you just need to change the variable names in the
    inner loop
    so that they do not conflict with the similar names in the
    outer loop
    (e.g. rename $RepeatSelectionCounter_1 to
    $RepeatSelectionCounter_2).
    Does that make sense?
    HTH,
    Randy
    > I basically have some SQL returning results of a search
    page, where you can
    > search on various keywords by checking boxes, and it
    returns Employers that
    > match those keywords :

  • Nested Repeat Region (How to convert from table to list)

    Sorry, i am really no PHP hero :-(
    i created a menu with the "nested repeat region" wizzard. Now i want to change the HTML from TABLE to LIST.
    I thought i just need to delete <table>- and <td>-tags, replace <tr> with <ul> and that's it. (But ist's NOT!)
    This is my code:
    ------- START ----------------
    <ul id="nav">
          <?php do { ?>      
              <li><?php echo $row_master1waa_page_top['top_name']; ?></li>
            <?php
      if ($totalRows_master1waa_page_top>0) {
        $nested_query_detail2waa_page_sub = str_replace("123456789", $row_master1waa_page_top['id_top'], $query_detail2waa_page_sub);
        mysql_select_db($database_WAA);
        $detail2waa_page_sub = mysql_query($nested_query_detail2waa_page_sub, $WAA) or die(mysql_error());
        $row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub);
        $totalRows_detail2waa_page_sub = mysql_num_rows($detail2waa_page_sub);
        $nested_sw = false;
        if (isset($row_detail2waa_page_sub) && is_array($row_detail2waa_page_sub)) {
          do { //Nested repeat
    ?>
              <ul>
                <li>  <?php echo $row_detail2waa_page_sub['sub_head']; ?></li>
              </ul>
              <?php
          } while ($row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub)); //Nested move next
    ?>
            <?php } while ($row_master1waa_page_top = mysql_fetch_assoc($master1waa_page_top)); ?>
    </ul>  
    ------- END -----
    The problem is located in line 3. the result is a list like this:
    <ul id="nav">
         <li>xxx</li>
         <li>xxx</li>
              <ul>
                    <li>xxx</li>
                    <li>xxx</li>
              </ul>
         <li>xxx</li>
    </ul>
    Of course it will not work. I need the nested list inserted like this:
    <ul id="nav">
         <li>xxx</li>
         <li>xxx
              <ul>
                    <li>xxx</li>
                    <li>xxx</li>
              </ul>
          </li>
         <li>xxx</li>
    </ul>
    Can someone please help me changing my code to get this result?

    Hi,
    I had trouble replying. I may be of some assistance until one of the Guru's get on.
    The whole thing works on loops based inside do and while
    EX.
    <?php
              do{    //end php, use html
    ?>
    I can repeat anthing here in HTML!
    <?php } while ( /* some critera exist ex: i<5 */      ); ?>
    so, your 'options' tag or LI' tags should only exist inside the first loop, check your { }
    The entire LIST  would repeat if you add the UL tags inside the nested loop area
    You may find it easier to reaplace the table with div tags and then indent the sub or nested loop with a class
    I don't have time to test this but try this:
    <ul id="nav">
    <ul>
    <?php do { ?>      
      <li><?php echo $row_master1waa_page_top['top_name']; ?></li>
    <?php
      if ($totalRows_master1waa_page_top>0) {
        $nested_query_detail2waa_page_sub = str_replace("123456789", $row_master1waa_page_top['id_top'], $query_detail2waa_page_sub);
        mysql_select_db($database_WAA);
        $detail2waa_page_sub = mysql_query($nested_query_detail2waa_page_sub, $WAA) or die(mysql_error());
        $row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub);
        $totalRows_detail2waa_page_sub = mysql_num_rows($detail2waa_page_sub);
        $nested_sw = false;
        if (isset($row_detail2waa_page_sub) && is_array($row_detail2waa_page_sub)) { ?>
       <ul>
      <?php  do { //Nested repeat ?>   
                   <li>  <?php echo $row_detail2waa_page_sub['sub_head']; ?></li>
            <?php } while ($row_detail2waa_page_sub = mysql_fetch_assoc($detail2waa_page_sub)); //Nested move next ?>
        </ul>
    <?php 
    ?>
            <?php } while ($row_master1waa_page_top = mysql_fetch_assoc($master1waa_page_top)); ?>
    </ul>
    Hit me back if its close but wonky..
    J

  • Use rsRecordset_total in a repeat region?

    Hi,
    Two recordsets. Recordset A contains customer details,
    including their
    unique customerID.
    I have this in a repeat region, listing customers by order of
    date.
    Recordset B, on the same page, contains order details with a
    PK called
    orderID and a FK; customerID.
    Is it possible to display the <%=(rsRecordsetB_total)%>
    WITHIN the repeat
    region for Recordset A so that, when viewing the list of
    customers, we can
    see how many orders each customer has made?
    So far, it only displays the total for the first recordset
    for every
    customer and we've worked out that this is because we are
    only repeating
    Recordset A, not B, so, therefore, the total for Recordset B
    won't change.
    Hope someone can help,
    Regards
    nath.

    you could just nest a loop inside of a loop.
    so lets say I have a filed that seletces users and all the prerequesists are defined inside of a veriable called query. Than i want to select all of there grades
    while($getter1 = mysql_fetch_array($query))
         echo $geter1['user'];
         echo "<br />";
         $select = "select * from gradebook were user='" . $geter1['user'] . "'";
         $run = mysql_query($select)or die(mysql_error());
         $i=1;
         while($getter2 = mysql_fetch_array($run))
              echo "grade" . $i . ": " . $getter2['grade'];
              $i = $i + 1;
    Now in this situation this would not be the best way to get the grades but it demonstrates nested loops (repeatable region inside a repeatable reigon)like what you want. I do however agree with the other person who posted you should use an SQL Join.

  • Email php function repeat region not working

    i have a form that needs to be emailed and it as products attached to it. however i have a repeat region to list all the products but when i email it ithe email only shows the first item on the list.
    below is the form set up
    //emailer
        // Email new tenant information
            $to = '[email protected]';// . ',' . '$row_rsOrder["Email"]';
            //$to = $row_rsOrder["Email"];
            $subject = "Your Order Details";
            $message = "
    <html>
    <head>
    <title>Dear ".$row_rsOrder['FirstName'].$row_rsOrder['LastName']."  please see your Order Details Below</title>
    </head>
            <body>
            <img src=\"http://www.website.com/images/logoBLPP.jpg\" alt=\"" />
            <h2>Your B Order".$row_rsOrder['OrderID']."</h2>
            <table width='800' border='0' cellspacing='0' cellpadding='0'>
                            <tr><td><p>Thank you for shopping  below are you details of the order you have recently placed. If you have any questions please contact us</p>
      <br />
            </a></p>
                            <tr><td></td></tr></table>
    <table width='980' border='1' cellspacing='0' cellpadding='10'>
          <tr valign='top'>
            <td bgcolor='#E9E9E9' class='header1'>Customer Name</td>
            <td class='text'>".$row_rsOrder['FirstName'] . $row_rsOrder['LastName']."</td>
            <td bgcolor='#E9E9E9' class='header1'>Order ID</td>
            <td bgcolor='#E9E9E9' class='text'>".$row_rsOrder['OrderID']."</td>
            <td bgcolor='#E9E9E9' class='header1'>Order Status</td>
            <td class='text'>".$row_rsOrder['TransactResult']."</td>
          </tr>
          <tr valign='top'>
            <td bgcolor='#E9E9E9' class='header1'>Email</td>
            <td class='text'>".$row_rsOrder['Email']."</td>
            <td bgcolor='#E9E9E9' class='header1'> </td>
            <td class='text'> </td>
            <td bgcolor='#E9E9E9' ><span class='header1'>Order Date</span></td>
            <td class='text'>".makeDateTime($row_rsOrder['OrderDate'], '%#d %B %Y', true)."</td>
          </tr>
          <tr valign='top'>
            <td bgcolor='#E9E9E9' class='header1'>Shipping Address</td>
            <td class='text'><p>".$row_rsOrder['Address']."</p>
              <p>".$row_rsOrder['Town']."</p>
              <p>".$row_rsOrder['PostCode']."</p>
              <p>".$row_rsOrder['Country']."</p>
              <p> </p></td>
            <td> </td>
            <td> </td>
            <td colspan='2' align='right' valign='bottom'><span class='header'> ORDER TOTAL:".DoFormatCurrency($row_rsOrder['Total'], 2, ',', '.', '£ ', '')."<br />
              </span><span class='text'>Shipping:".DoFormatCurrency($row_rsOrder['Shipping'], 2, ',', '.', '£ ', '')."</span><span class='header'><br />
            </span></td>
          </tr>
          <tr valign='top'>
            <td bgcolor='#E9E9E9' class='header1'>Product ID</td>
            <td bgcolor='#E9E9E9' class='header1'>Product Description</td>
            <td bgcolor='#E9E9E9' colspan='2' class='header1'>Size</td>
            <td bgcolor='#E9E9E9' ><span class='header1'>Quantity</span></td>
            <td bgcolor='#E9E9E9' align='right'><span class='header1'>Price</span></td>
          </tr>
          <?php do { ?>
          <tr valign='top'>
            <td class='text'>".$row_rsOrder['ProductID']."</td>
            <td class='text'>".$row_rsOrder['Product'].','.$row_rsOrder['catname']."</td>
            <td colspan='2' class='text'>".$row_rsOrder['UnitSize']."</td>
            <td><span class='text'>".$row_rsOrder['Quantity']."</span></td>
            <td align='right' class='text'>". DoFormatCurrency($row_rsOrder['UnitPrice'], 2, ',', '.', '£ ', '')."</td>
          </tr>
          <?php } while ($row_rsOrder = mysql_fetch_assoc($rsOrder)); ?>
            <tr valign='top'>
            <td class='text'> </td>
            <td class='text'> </td>
            <td colspan='2' class='text'> </td>
            <td> </td>
            <td> </td>
          </tr>
        </table>
    </body>
    </html>
            // Always set content-type when sending HTML email
            $headers = "MIME-Version: 1.0" . "\r\n";
            $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
            $headers .= 'From: company name <[email protected]>' . "\r\n";
            $send = mail($to, $subject, $message, $headers);

    Yes, ALL product information in the database were retrieved and sent to the email. Only 3 products for testing purposes.
    I just tested it down to the do-while loop. The html table code after that is missing.
    You have to bare in mind this is a crude test. The database set up query is not as complex as yours is so that may be why its working but certainly breaking up the 'message' is the way to go. I may try and get the products from another table tomorrow if I have time to test.
    The html code and column database names are the same as you have. the recordeset is 'rsOrders' instead of 'rsOrder' that you used,
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_conDonations, $conDonations);
    $query_rsOrders = "SELECT * FROM orders";
    $rsOrders = mysql_query($query_rsOrders, $conDonations) or die(mysql_error());
    $row_rsOrders = mysql_fetch_assoc($rsOrders);
    $totalRows_rsOrders = mysql_num_rows($rsOrders);
    //emailer
        // Email new tenant information
    $to = '[email protected]';// . ',' . '$row_rsOrder["Email"]';
            //$to = $row_rsOrder["Email"];
    $subject = "Your Order Details";
    $message = "
    <html>
    <head>
    <title>Dear ".$row_rsOrders['FirstName']." please see your Order Details Below</title>
    </head>
            <body>
    <img src=\"http://www.website.com/images/logoBLPP.jpg\" alt=\"\" />
    <h2>Your B Order".$row_rsOrders['OrderID']."</h2>
    <table width='800' border='0' cellspacing='0' cellpadding='0'>
    <tr><td><p>Thank you for shopping  below are you details of the order you have recently placed. If you have any questions please contact us</p>
    <br />
    </a></p>
    <tr><td></td></tr></table>
    <table width='980' border='1' cellspacing='0' cellpadding='10'>
          <tr valign='top'>
            <td bgcolor='#E9E9E9' class='header1'>Customer Name</td>
            <td class='text'>".$row_rsOrders['FirstName']."</td>
            <td bgcolor='#E9E9E9' class='header1'>Order ID</td>
            <td bgcolor='#E9E9E9' class='text'>".$row_rsOrders['OrderID']."</td>
            <td bgcolor='#E9E9E9' class='header1'>Order Status</td>
            <td class='text'>".$row_rsOrders['TransactResult']."</td>
          </tr>
                             <tr valign='top'>
            <td bgcolor='#E9E9E9' class='header1'>Email</td>
            <td class='text'>".$row_rsOrders['Email']."</td>
            <td bgcolor='#E9E9E9' class='header1'> </td>
            <td class='text'> </td>
            <td bgcolor='#E9E9E9' ><span class='header1'>Order Date</span></td>
            <td class='text'>".$row_rsOrders['OrderDate']."</td>
          </tr>
                            <tr valign='top'>
            <td bgcolor='#E9E9E9' class='header1'>Shipping Address</td>
            <td class='text'><p>".$row_rsOrders['Address']."</p>
              <p>".$row_rsOrders['Town']."</p>
              <p>".$row_rsOrders['PostCode']."</p>
              <p>".$row_rsOrders['Country']."</p>
              <p> </p></td>
            <td> </td>
            <td> </td>
            <td colspan='2' align='right' valign='bottom'><span class='header'> ORDER TOTAL:".$row_rsOrders['Total']."<br />
              </span><span class='text'>Shipping:".$row_rsOrders['Shipping']."</span><span class='header'><br />
            </span></td>
                                      </tr>
          <tr valign='top'>
            <td bgcolor='#E9E9E9' class='header1'>Product ID</td>
            <td bgcolor='#E9E9E9' class='header1'>Product Description</td>
            <td bgcolor='#E9E9E9' colspan='2' class='header1'>Size</td>
            <td bgcolor='#E9E9E9' ><span class='header1'>Quantity</span></td>
            <td bgcolor='#E9E9E9' align='right'><span class='header1'>Price</span></td>
          </tr>";
                            ?>
    <?php do { ?>
    <?php $message .="  <tr valign='top'>
            <td class='text'>".$row_rsOrders['ProductID']."</td>
            <td class='text'>".$row_rsOrders['Product']."</td>
            <td colspan='2' class='text'>".$row_rsOrders['UnitSize']."</td>
            <td><span class='text'>".$row_rsOrders['Quantity']."</span></td>
            <td align='right' class='text'>".$row_rsOrders['UnitPrice']."</td>
          </tr>";
                            ?>
    <?php } while ($row_rsOrders = mysql_fetch_assoc($rsOrders)); ?>
    <?php $message .="
    </body>
    </html>";
            // Always set content-type when sending HTML email
            $headers = "MIME-Version: 1.0" . "\r\n";
            $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
            $headers .= 'From: company name <[email protected]>' . "\r\n";
            $send = mail($to, $subject, $message, $headers);
    mysql_free_result($rsOrders);
    ?>

  • Horizontal Repeat Region

    How do I create a horizontal repeat region that drops to the
    next row when the width of the data exceeds the table width?
    Something like this:
    01 02 03 04 05
    06 07 08 09 10
    11 12 13 14 15
    Each would represent a thumbnail with a title under it

    AngryCloud wrote:
    > How do I create a horizontal repeat region that drops to
    the next row when the
    > width of the data exceeds the table width?
    Try the horizontal looper from www.tom-muck.com. The Adobe
    Dreamweaver
    Developer Toolbox (formerly Kollection) also has this
    feature.
    David Powers, Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Spry collapsible panel - repeating region

    Hi,
    I'm trying to make a repeating region that contains a spry
    collapsable panel.
    The problem is that i need to develop a way to automatically
    increase the ID of the spry panel.
    The problem I am encountering is that only the first
    Collapsible Panel works properly. The remainder are displaying the
    data, but will not open and close when their tabs are clicked. It
    appears that all are being repeated as
    id="CollapsiblePanel1".
    Does anyone have a way to increment the Tab & Content
    ID's?
    On another forum, somebody has suggested using the following
    PHP - although having never used PHP before, I am uncertain as to
    where I insert this into my code:

    bump

Maybe you are looking for

  • Export to PDF in CS4 does not include TrueType glyphs

    I created a Indesign CS4 document with Times (a Mac OS system font), inserted some glyphs such as 1/2 or 1/4, and exported it as a PDF. The glyphs however are not rendered properly - they appear as boxes. If I print the file to my printer or print to

  • Problem in error handling in SAX Parser

    My application takes xml message as input. If a error was found while validating, an <Errors> <Error></Error></Errors> element is included in the orginal message and send back to the user. While validation xml message I found an interesting problem.

  • Thunderbolt to HDMI doesnt work

    I'm having trouble setting up dual monitor for my video editing work, I'm using LG (24MP76) as 2nd monitor hooking up to iMac (12,2) i5 Using thunderbolt to HDMI cable. It doesn't work at all, iMac doesnt pick up and LG kept searching then shut down

  • Model Furnace Capacity in APO PPDS

    Hi Experts, I am doing an implementation for an enginering Industry and i have to model furnace capapcity in APO PPDS, below is my requirement. As an example RR have a furnace that processes parts in batches of 500 units and they want to sequence the

  • Machine authentication not working with peap mschapv2

    I have installed ACS ver 4.1.1 trial downloaded from cisco web sites. I have configure 802.1x machine authentication using self generated certificate with unknown user policy configure for windows database authentication. I can authenticate user via