Advanced Theme Integration: Accessing RISE CRM Data (CI4)

The Power of Native CodeIgniter 4 Integration
Because PolyCMS for RISE runs natively inside your RISE CRM 4.1 (CodeIgniter 4) runtime, your custom themes and sub-plugins can read live CRM data via CI4 db_connect() or native model() helpers without external API hops.
Displaying Active Team Members in Your Theme
Inside your theme template (such as sidebar.php), query active staff profiles safely using CI4 Query Builder:
<?php
$db = db_connect();
$team = $db->table('users')
->select('first_name, last_name, job_title, image')
->where('user_type', 'staff')
->where('status', 'active')
->where('deleted', 0)
->limit(5)
->get()->getResult();
foreach ($team as $member) {
echo '<p>' . esc($member->first_name . ' ' . $member->last_name) . '</p>';
}
?>Best Practices for Theme Data Queries
- Always filter
deleted = 0on RISE core tables. - Escape every rendered value using CI4
esc(). - Wrap expensive aggregations in
polycms_cache_remember()to keep storefront and blog response times fast.
* This is onboarding & guide demo data for PolyCMS on RISE CRM to help your team explore blog, pages, SEO, REST API, and MTBuilder visual layouts. Explore guides & blog articles: https://risecrm.polyxgo.com





Add Comment