Favorites and Multiple Sections

4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 13, 2016   (RSS)

By Toledoh - May 11, 2016

Hi Guys.

Is it possible to have the favorites plugin work with multiple tables?

I've got a table for "Alpine" activities and another table with "Snow Board" Activities.  Alpine Activities have a detail page alpine.php, and Snow Board have snowboard.php.

I can "add" favorites as normal on both pages - however to create a list, how do I show them?  Currently:

<?php foreach ($favoriteRecords as $record): ?>
<?php
$tableOrTag = 'XXX'; // Update with your section's table name
$recordNum = $record['num']; // Update this with current record number
$recordName = $record['label']; // Update this with current record number
$recordIcon = $record['icon']; // Update this with current record number
?>
<div class="col-xs-4">
<a href="XXX.php?num=<?php echo $recordNum ?>">
<div class="thumbnail">
<span class="icon-icon_<?php echo $recordIcon ?>" aria-hidden="true"></span>
<div class="caption"><?php echo $recordName ?></div>
</div>
</a>
</div>

<?php endforeach; ?>

Cheers,

Tim (toledoh.com.au)

By Toledoh - May 12, 2016

Thanks Ross - sometimes I think I start looking for an issue, ignoring the simple solutions!

Cheers,

Tim (toledoh.com.au)

By ross - May 13, 2016

Hi Tim

Glad that helped. Let me know if there is anything else I can lend a hand with :).

-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/