Advanced Theme Integration: Accessing Perfex CRM Data

Advanced Theme Integration: Accessing Perfex CRM Data

The Power of Native Blogging

Because PolyCMS runs natively inside your Perfex CRM CodeIgniter instance, your themes have full access to the underlying CRM database via the $CI super-object.

Displaying Staff Profiles in Your Theme

Let's say you want to create an "Our Team" section in your blog's sidebar. Instead of hardcoding HTML, you can dynamically pull active staff members directly from Perfex CRM.

Inside your theme's sidebar.php file, you can write standard CodeIgniter queries:

<?php
$CI =& get_instance();
$CI->db->where('active', 1);
$staff_members = $CI->db->get(db_prefix() . 'staff')->result();

echo '<h3>Meet Our Team</h3><ul>';
foreach($staff_members as $staff) {
echo '<li>' . $staff->firstname . ' ' . $staff->lastname . '</li>';
}
echo '</ul>';
?>

Dynamic Lead Generation Forms

You can also embed dynamic forms that POST directly to your Perfex Web-to-Lead endpoint. Since you are on the same domain, you avoid CORS issues and can easily pass hidden fields tracking exactly which blog post generated the lead!


* This is demo data for PolyCMS module for Perfex CRM to help customers explore features. If your business uses Perfex CRM and needs customizations or enhancements for integrated plugins/themes, you can leave feedback on Envato (CodeCanyon) while having active support time. Useful and suitable features will be received, integrated and updated. Explore full official docs: https://headrandom.com/oX3Im6fx