close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Building a repeat region with styles

Thread began 7/18/2012 2:01 pm by Paul | Last modified 7/19/2012 4:01 pm by Paul | 1220 views | 15 replies |

Paul

Building a repeat region with styles

Hi,

I was tiring to basically add a repeat region with style that i have in my css.

So for and example i have a page that's called calender.

What i would like to do is that every time i post a new event i would like if it could pull all the info from the database and recreate that box with however many postings i have in the Data Base.


So it would be like below.


(Event 1) (Event 2) (Event 3)

(Event 4) (Event 5) (Event 6)

and so on....

I hope this makes sense and thanks for your time in helping me out.

-Issac

Sign in to reply to this post

Jason ByrnesWebAssist

So you want a repeat region that creates columns and rows?

use the Data Assist Repeating table for this. see the "Using Repeating Tables in Data Bridge" tutorial on the Data Bridge support page:
data-bridge/

Sign in to reply to this post

Paul

Basically but not in a table. Is there a way to do this only using divs? if not please explain the tables version if possible.

Thanks for the quick reply!

Sign in to reply to this post

Jason ByrnesWebAssist

you could do this with Divs and spans. add the repeat region around the span tag:

example:

php:
<div style="width:600px; overflow:hidden;">

<?php do { ?>
<span style="float:left;width:200px;"><?php echo $_rowRecordsetName['columnName']</span>
<?
php } while ($row_recordsetName mysql_fetch_assoc($recordsetName)); ?>
</div>
Sign in to reply to this post

Paul

Hey Jason,

I'm getting a syntax code error when i add that line of code.

And just in case i did change the $row_recordset name and all the default text you've added with my information

Thanks!


Oh yeah and it just doesn't display anything the page goes white.

Sign in to reply to this post

Jason ByrnesWebAssist

this is an example, and not complete code.


add the div and span to your page:
<div style="width:600px; overflow:hidden;">
<span style="float:left;width:200px;">recordset binding here</span>
</div>



Where it says "recordset binding here" replace that with the bindings from the bindings panel to show the recordset information, select the span tag, and add the repeat region.

Sign in to reply to this post

Paul

I still cant get it to work .

This is the code i have it still only displays the first entry.

Sorry for coping and pasting but its just so you have a better look at my code.



<?php do { ?>

<div id="calender_event" onclick="location.href='plugins/event_page.html';" style="cursor:pointer;">

<div id="calenderday"><a style="color:#c8dd5d; text-decoration:none;" href="#"><?php echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'events', 'Day'); ?></a></div>

<div id="calendereventday"><?php echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'events', 'Month and date'); ?></div>

<div id="calenderevent_discription"><?php echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'events', 'Small Discription'); ?></div>

</div>

<?php } while ($row_PowerCMSConnection = mysql_fetch_assoc($PowerCMSConnection)); ?>

Sign in to reply to this post

Jason ByrnesWebAssist

how is the PowerCMSConnection recordset configured?

It sounds like the recordset is the problem.

Sign in to reply to this post

Paul

Ok sorry about the confusion I've been working on this..

I got it to repeat the region so That's awesome!

Thanks so much for that but it seems like i have another issue.

I can Now pull the info through but not all of the database info is showing that i want to display. The div that reads "calenderevent_discription" is able to bring the database info to display But it is not displaying the top 2.

I've tried the same line of code that "calenderevent_discription" is using in the other divs and it pulls fine I then replace the tables name from the code that is from the database and it wont function even using the same code but different table.

Here is my Code again..

Thanks!


<?php do { ?>
<div id="calender_event" onclick="location.href='plugins/event_page.html';" style="cursor:pointer;">

<div id="calenderday"><a style="color:#c8dd5d; text-decoration:none;" href="#"><?php
include('/Applications/MAMP/htdocs/sitename/WA_CMS/addtosite.php');
echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'events','Day', false, $row_Recordset1['ContentPageSetOrder']);?></a></div>

<div id="calendereventday"><?php
include('/Applications/MAMP/htdocs/sitename/WA_CMS/addtosite.php');
echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'events','Month and date', false, $row_Recordset1['ContentPageSetOrder']);?>
</div>

<div id="calenderevent_discription"><?php
include('/Applications/MAMP/htdocs/sitename/WA_CMS/addtosite.php');
echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'events','Event Title', false, $row_Recordset1['ContentPageSetOrder']);?>
</div>

</div>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>

Sign in to reply to this post

Paul

Good Morning Jason,

Any word of this issue?

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