10 Replies Latest reply on Jun 12, 2008 5:34 AM by Newsgroup_User

    Repeating Regions

    ITLogic Level 1
      I have a strange question. I know this can be done in ASP dynamically, but I'm wondering if Dreamweaver has a way of doing it with the generated HTML.

      I am designing some sites with Contribute users in mind. I have a script that creates a ticker where each ticker fades in and out as the next is displayed. The content of the ticker is read from a regular HTML page, where each set of ticker content is in it's own DIV tag. The advantage is that I can create a blank web page based on my repeating region template. Then the the Contribute user can use the cool little [+ - ^ v] thing to modify the data of the ticker.

      Here is the bad part. Each DIV tag has to have a unique sequential ID. Like Div0, Div1, Div2... Is there any way I can make the ID attribute count as new regions are created?
        • 1. Re: Repeating Regions
          Level 7
          Yes, there is. I'll have to dig around to find out how to do it, though -
          standby....

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "ITLogic" <webforumsuser@macromedia.com> wrote in message
          news:g2k21i$s94$1@forums.macromedia.com...
          >I have a strange question. I know this can be done in ASP dynamically, but
          >I'm
          > wondering if Dreamweaver has a way of doing it with the generated HTML.
          >
          > I am designing some sites with Contribute users in mind. I have a script
          > that
          > creates a ticker where each ticker fades in and out as the next is
          > displayed.
          > The content of the ticker is read from a regular HTML page, where each set
          > of
          > ticker content is in it's own DIV tag. The advantage is that I can create
          > a
          > blank web page based on my repeating region template. Then the the
          > Contribute
          > user can use the cool little [+ - ^ v] thing to modify the data of the
          > ticker.
          >
          > Here is the bad part. Each DIV tag has to have a unique sequential ID.
          > Like
          > Div0, Div1, Div2... Is there any way I can make the ID attribute count as
          > new
          > regions are created?
          >

          • 2. Re: Repeating Regions
            ITLogic Level 1
            WOW! That would be fantastic if you could find out, I have done some searches, but everything I come up with involved dynamic database driven code.

            Thanks!
            • 3. Re: Repeating Regions
              Level 7
              Which DW are you using? And, can you show me the markup around several of
              your repeat regions?

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "ITLogic" <webforumsuser@macromedia.com> wrote in message
              news:g2lt5s$19h$1@forums.macromedia.com...
              > WOW! That would be fantastic if you could find out, I have done some
              > searches, but everything I come up with involved dynamic database driven
              > code.
              >
              > Thanks!

              • 4. Re: Repeating Regions
                ITLogic Level 1
                Sure. I'm using DW CS3. Here is a copy of the repeating regions I'm trying to create. Notice each DIV has a sequential ID. I could go hand edit this, but I'm trying to automate it as much as possible. I am selling Contribute as a means for clients to edit their own content. Most don't know how to spell HTML much less know how to use it.

                <div id="content0" style="display:''">

                <!-- ADD TICKER's CONTENT #1 HERE--------------------->

                <p>Hello</p>

                <!-- END CONTENT #1----------------->

                </div>

                <div id="content1" style="display:none">

                <!-- ADD TICKER's CONTENT #2 HERE--------------------->

                <p>World</p>

                <!-- END CONTENT #2----------------->

                </div>
                • 5. Re: Repeating Regions
                  Level 7
                  I need to see the template markup around the repeating region, please.

                  --
                  Murray --- ICQ 71997575
                  Adobe Community Expert
                  (If you *MUST* email me, don't LAUGH when you do so!)
                  ==================
                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                  ==================


                  "ITLogic" <webforumsuser@macromedia.com> wrote in message
                  news:g2m25n$6se$1@forums.macromedia.com...
                  > Sure. I'm using DW CS3. Here is a copy of the repeating regions I'm trying
                  > to
                  > create. Notice each DIV has a sequential ID. I could go hand edit this,
                  > but I'm
                  > trying to automate it as much as possible. I am selling Contribute as a
                  > means
                  > for clients to edit their own content. Most don't know how to spell HTML
                  > much
                  > less know how to use it.
                  >
                  > <div id="content0" style="display:''">
                  >
                  > <!-- ADD TICKER's CONTENT #1 HERE--------------------->
                  >
                  > <p>Hello</p>
                  >
                  > <!-- END CONTENT #1----------------->
                  >
                  > </div>
                  >
                  > <div id="content1" style="display:none">
                  >
                  > <!-- ADD TICKER's CONTENT #2 HERE--------------------->
                  >
                  > <p>World</p>
                  >
                  > <!-- END CONTENT #2----------------->
                  >
                  > </div>
                  >

                  • 6. Re: Repeating Regions
                    Level 7
                    For grins, try changing this -

                    <div id="content1" style="display:none">

                    to this (IN THE TEMPLATE FILE) -

                    <div id="content@@(_repeat._index)@@'' style="display:none">

                    (that should be a " character after the last @ sign - I had to use two '
                    characters to keep the code from getting munged in my newsreader)


                    --
                    Murray --- ICQ 71997575
                    Adobe Community Expert
                    (If you *MUST* email me, don't LAUGH when you do so!)
                    ==================
                    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                    ==================


                    "Murray *ACE*" <forums@HAHAgreat-web-sights.com> wrote in message
                    news:g2m3cq$85h$1@forums.macromedia.com...
                    >I need to see the template markup around the repeating region, please.
                    >
                    > --
                    > Murray --- ICQ 71997575
                    > Adobe Community Expert
                    > (If you *MUST* email me, don't LAUGH when you do so!)
                    > ==================
                    > http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                    > http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                    > ==================
                    >
                    >
                    > "ITLogic" <webforumsuser@macromedia.com> wrote in message
                    > news:g2m25n$6se$1@forums.macromedia.com...
                    >> Sure. I'm using DW CS3. Here is a copy of the repeating regions I'm
                    >> trying to
                    >> create. Notice each DIV has a sequential ID. I could go hand edit this,
                    >> but I'm
                    >> trying to automate it as much as possible. I am selling Contribute as a
                    >> means
                    >> for clients to edit their own content. Most don't know how to spell HTML
                    >> much
                    >> less know how to use it.
                    >>
                    >> <div id="content0" style="display:''">
                    >>
                    >> <!-- ADD TICKER's CONTENT #1 HERE--------------------->
                    >>
                    >> <p>Hello</p>
                    >>
                    >> <!-- END CONTENT #1----------------->
                    >>
                    >> </div>
                    >>
                    >> <div id="content1" style="display:none">
                    >>
                    >> <!-- ADD TICKER's CONTENT #2 HERE--------------------->
                    >>
                    >> <p>World</p>
                    >>
                    >> <!-- END CONTENT #2----------------->
                    >>
                    >> </div>
                    >>
                    >

                    • 7. Re: Repeating Regions
                      ITLogic Level 1
                      WOW PERFECT! Sorry I took so long to reply, I got tied up. That did the trick. The only problem is when you reorder the DIV's in the repeating region. The index doesn't update to keep them sequential, but if I delete a region, it renumbers all the subsequent indexes.

                      Thanks a million. This should give me the opportunity to do some impressive stuff for my Contribute users. One last thing. I'm guessing I can just look in the Dreamweaver help files to see what other DW variables are available to work with?
                      • 8. Re: Repeating Regions
                        Level 7
                        You may have a hard time finding them there, to tell you the truth. See if
                        you can find anything under 'template expressions'. Or you could pick up a
                        used copy of my book - probably for pennies - at Amazon....

                        Dreamweaver MX Templates
                        http://www.amazon.com/exec/obidos/ASIN/0735713197/qid=1026670403/sr=1-3/ref=sr_1_3/104-954 5862-7153537

                        It's way out of date, but still perfectly valid. The template engine has
                        not changed at all.

                        --
                        Murray --- ICQ 71997575
                        Adobe Community Expert
                        (If you *MUST* email me, don't LAUGH when you do so!)
                        ==================
                        http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                        http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                        ==================


                        "ITLogic" <webforumsuser@macromedia.com> wrote in message
                        news:g2q0e7$m7o$1@forums.macromedia.com...
                        > WOW PERFECT! Sorry I took so long to reply, I got tied up. That did the
                        > trick.
                        > The only problem is when you reorder the DIV's in the repeating region.
                        > The
                        > index doesn't update to keep them sequential, but if I delete a region, it
                        > renumbers all the subsequent indexes.
                        >
                        > Thanks a million. This should give me the opportunity to do some
                        > impressive
                        > stuff for my Contribute users. One last thing. I'm guessing I can just
                        > look in
                        > the Dreamweaver help files to see what other DW variables are available to
                        > work
                        > with?
                        >

                        • 9. Re: Repeating Regions
                          ITLogic Level 1
                          Your right. It tried to find them last night in the help files without much luck. I'll check out your book. How cool is that you wrote a book! If I get it will you autograph it for me? LOL
                          • 10. Re: Repeating Regions
                            Level 7
                            > If I get it will you autograph it for me? LOL

                            Heh - only if you pay full price! 8)

                            --
                            Murray --- ICQ 71997575
                            Adobe Community Expert
                            (If you *MUST* email me, don't LAUGH when you do so!)
                            ==================
                            http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                            http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                            ==================


                            "ITLogic" <webforumsuser@macromedia.com> wrote in message
                            news:g2r4j9$1de$1@forums.macromedia.com...
                            > Your right. It tried to find them last night in the help files without
                            > much luck. I'll check out your book. How cool is that you wrote a book! If
                            > I get it will you autograph it for me? LOL