There is some custom code in member.php that creates an associative array of member-specific information and assigns it to smarty. The information in the array is presented in a tab under member.html template. Given the advice to put all customization into site.inc.php, I need advice on how to achieve this. I tried moving it into a function that is hooked into the "after_login" hook. However, in the template, nothing is output from the array. I understand the general concept of site.inc.php fairly well. I was able to add fields to the product record, and configure them in the admin pages. That was fairly simple. But beyond that, the usage of site.inc seems very limited, or if not, perhaps beyond my technical level. The question is, given an array of member-specific information created in a hook function, how to then make it available to the member template pages in a form smarty can use in a foreach. I understand php/html/css fairly well. Smarty, not so much. Should I just give up on the site.inc idea and simply leave my mods as a hack of the aMember php code? This is version 3 anyway, which I presume will not be updated again.
I was able to solve this by storing the array in $_SESSION['my_array'] in the hook function: Code: if(!isset($_SESSION['my_array'])) $_SESSION['my_array']=$local_array; In the template the code used to access it is: Code: {foreach from=$smarty.session.my_array item=t key=mykey} - -html statements-- {/foreach} This works fine, but I would still be interested in knowing if there is a way to assign the array to the session's smarty instance instead of to the session itself.