I have a UDT that fetches data from a custom database table and assigns it to a Smarty variable like this:
Code: Select all
global $smarty, $db;
$query = "SELECT title, content FROM cms_my_custom_table WHERE id = ?";
$result = $db->GetRow($query, [1]);
if ($result) {
$smarty->assign('my_custom_data', $result);
}
Code: Select all
{$my_custom_data.title}
{$my_custom_data.content}
Am I missing something in how CMSMS handles UDTs and variable assignment? Any help would be greatly appreciated!