Split list into two divs on the same page

5 posts by 2 authors in: Forums > CMS Builder
Last Post: August 9, 2016   (RSS)

By MercerDesign - August 4, 2016

Hi, I followed this post (http://www.interactivetools.com/forum/forum-posts.php?postNum=2230025#post2230025) but I don't need the next and previous links, it doesn't work without them, I basically need the first two articles to display from a multi record list (latest_news), the first article to display in one div and the second to display in a different div. Thanks in advance.

By Damon - August 5, 2016

How about this:

list($newRecords, $newsMetaData) = getRecords(array(
'tableName' => 'new',
'limit' => '2',
'loadUploads' => true,
'allowSearch' => false,

This will load the latest 2 articles.

And this will put each of the article content into a div:

<?php foreach ($newsRecords as $record): ?>
     <?php echo htmlencode($record['title']) ?><br />
     ...add more content here as needed...
<?php endforeach ?>

Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.

By MercerDesign - August 8, 2016

Thanks that works but how can I make the two DIVS different, I want the first story to be in a larger DIV and the second one in a smaller sized one.

By MercerDesign - August 9, 2016

That's brilliant thanks. Works perfectly!