get_object_categories($currentObject['type'], $currentObject['object']); $objectCategoryIdsNoJail = $categlib->get_object_categories( $currentObject['type'], $currentObject['object'], -1, false ); } $smarty->assign_by_ref('objectCategoryIds', $objectCategoryIds); // use in smarty {if isset($objectCategoryIds) and in_array(54, $objectCategoryIds)} My stuff ..{/if} }