multiple records

29 posts by 4 authors in: Forums > CMS Builder
Last Post: October 12, 2010   (RSS)

By (Deleted User) - August 24, 2010

Oops, my bad :)

Should be attached now.

Thanks Donna.

ps. CMS Builder working great so far - very impressed!
Attachments:

smesa.php 5K

Re: [Jason] multiple records

By (Deleted User) - August 24, 2010

Excellent Jason, it's working well. Don't want to throw a spanner in the works but what if I wanted the next and previous to show the next 5 items - would that be possible?

This would be useful to maintain my layout to only showing 5 items but allowing users to browse older posts.

Re: [smesa] multiple records

By Jason - August 24, 2010

Hi,

The way this code is set up, there isn't an easy way of doing this. This is because the recordSet you're outputting is a combination of multiple queries. That being said, it is possible to do, but would require a greater degree of customization. If this is something you're interested in, we can take a look at doing this through our consulting service. Just send an email to consulting@interactivetools.com and we can get you a quote on what it would take.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] multiple records

By Chris - August 24, 2010

Hi there,

Yes, this would be very tricky the way that you've got it set up.

However, if you were to use one section with a "category" field (instead of multiple sections,) it would be easy to get pagination working. For more information on how to do this, check out the [url http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/Sub-categories_Tutorial_P77230/]Sub-categories Tutorial[/url].
All the best,
Chris

Re: [chris] multiple records

By (Deleted User) - August 24, 2010

Hi Chris,

Your way definately makes sense but how would you then display just one of the categories if you needed to?

i.e. if I created categories: technology, finance, marketing, etc. and only wanted finance articles to display - how would I do that?

Basically my overall goal is to have seperate pages each with their own articles and a homepage that displays the latest articles added to each section.

Re: [smesa] multiple records

By Jason - August 25, 2010

Hi,

If all of your articles appeared in only one section, with each having a different category, you could pull out one category like this:
example:
list($financeRecords,$financeMetaData)=getRecords(array(
'tableName' => 'articles',
'allowSearch' => false,
'where' => "category = 'finance'",
));


Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] multiple records

By (Deleted User) - August 25, 2010

Thank you Jason - and pass my thanks to the rest of the team. I'm very impressed with the support and the software and will be using CMS Builder in all my content managed sites from now on.

I will play around with the different record options and let you know how it goes.

Who can I send a testimonial to?

Re: [smesa] multiple records

By Jason - August 25, 2010

Hi,

Glad to hear that everything is going well for you. Let me know if you run into any issues.

Probably the best place to send a testimonial to would be sales@interactivetools.com

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] multiple records

By (Deleted User) - August 25, 2010

Hi Jason,

How would you make this a drop down instead of a list?

<ul>
<li><a href="?">(All Articles)</a></li>
<?php foreach ($categoriesRecords as $categoryRecord): ?>
<?php echo $categoryRecord['_listItemStart'] ?>

<?php if ($categoryRecord['_isSelected']): ?><b><?php endif ?>
<a href="?category=<?php echo $categoryRecord['num'] ?>"><?php echo $categoryRecord['name'] ?></a>
<?php if ($categoryRecord['_isSelected']): ?></b><?php endif ?>

<?php echo $categoryRecord['_listItemEnd'] ?>
<?php endforeach ?>
</ul>