Show field from linked category section

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 1, 2010   (RSS)

almost live with my site. But still some problems…

I have a multi record section called "links" with the following fields:
title, url, category. The category is a drop down list populated from another multi record section called "links_categories"
The "links_categories" has the fields: title, icon. The icon is an upload field… pretty basic...

Everything is working in the back and front-end only one thing: how do i show the icon from the category with the links?

list($linksRecords, $linksMetaData) = getRecords(array(
'tableName' => 'links',
'perPage' => '10',
'orderBy' => 'RAND()',
'allowSearch' => '0',
));


body:

<?php foreach ($linksRecords as $record): ?>
(here i want to show the icon from the category that is linked to the title)
<?php echo $record['title'] ?>
<?php echo $record['url'] ?>
<?php endforeach ?>



thanks!

Re: [Jason] Show field from linked category section

I don't need an 'array' to see my category, because that code is already generated in the code generator of CMSB.

It's the 'icon' (upload) that i want to see from my categories...


Thanks anyway!

Re: [videopixel] Show field from linked category section

By Jason - September 1, 2010

Hi,

The array for the category is not just the category name, but the whole category record, this would include the icon field. Your other record will just have the category name, but no other information about the category.

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/