View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Print style for repeating regions

Thread began 3/23/2009 6:07 pm by troyd | Last modified 3/29/2009 12:23 am by troyd | 3596 views | 8 replies

Danilo Celic

You can create a repeating div region within Dreamweaver pretty much the same way you create a repeating row region in a table, first you add the content you want to repeat, a div in this case, then select that content, again, the div and add repeat region to the selection by going to the Server Behaviors panel, clicking the + button and selecting Repeat Region.

When it comes to counter, I've already supplied some sample code, but I'll try to explain again...basically, you create a variable, set it's starting value, in this case 1, but it could be any value that is useful for the case at hand, and then within the repeat region, you increment that variable value (add one to the current value).

If you need to do something with the value as you loop (repeat), then check that value, either before the increment or after the increment, depending on exactly what you want to accomplish. In this case it checks the remainder of the division of the counter by 2, if that remainder is 0, then we have an even row, then you can do whatever you want to based upon the result of the check against the current value of the counter, in this case write out the page break div, but you can do other things, such as write out a CSS class name for the alternate rows.

You can read up on how to apply repeat regions in the "Making pages dynamic" section of the Dreamweaver help. As for counter variables, I'm not aware of anything in particular that discusses the topic. A casual search of Google for PHP counter variable yeilds a few results, perhaps start there.

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





Ease of use


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