unique id required when sorting records on list page

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 31, 2009   (RSS)

By Deborah - August 31, 2009

I'm using an expanding panel widget on a multi-record list page viewer that requires each item in the list to display with unique html code.

Example:

<div id="div_1">
<div id="item1_1">
<?php echo $record['project_title'] ?>
<?php echo $record['project_description'] ?>
</div>
</div>

<div id="div_2">
<div id="item2_2">
<?php echo $record['project_title'] ?>
<?php echo $record['project_description'] ?>
</div>
</div>


<div id="div_3">
<div id="item3_3">
<?php echo $record['project_title'] ?>
<?php echo $record['project_description'] ?>
</div>
</div>

Is there a way with PHP to display the top-sorted record in div_1, the second in div_2, etc?

I am using dragSortOrder to order the records.

Thanks for any help!!!

Re: [sagentic] unique id required when sorting records on list page

By Deborah - August 31, 2009

Kenny,

Your advice was right on! Great advice!

I thought I needed sequential numbering, but all I needed was unique numbering, as provided with the $record['num'], as you suggested.

Thanks so much for your assistance.

Deborah