I've been working on customizing CiviCRM for my kids school. I documented how i exposed relationship information on a profile view in this blog post. In the past week i've also exposed "activities" and "a multiple record custom group" via profiles which i'll describe in this blog post. All this work was done via civicrm hooks and custom templates and run on CiviCRM v2.2.8. You can download the code from here.
- Implement hook_civicrm_pageRun for the profile view page (CRM_Profile_Page_Dynamic). Only implement this hook for the specific profile id's you want relationship information. In this case we have two profiles, a Parent Profile (gid=3) and a Student Profile (gid=4)
- The pageRun hook also adds the module's template directory to the smarty include path, so we dont have to set it globally. This also allow multiple modules to append different template directories to the template include path (check the function _sfschool_initialize)
- The hook gets either the parent or the child information using a custom query. We ensure that only permissioned parents can see their child information (in case of some complicated family structures). The queries are relatively simple at this stage, i suspect they will increase in complexity over the next few weeks
- The hook exposes the information gathered from the database to the smarty template
- The custom template (templates/CRM/Profile/Page/3/Dynamic.tpl) uses that information to display the relationship data on the page. I also edited the View.tpl template to eliminate the "Back to Listings" link.
My name is Jamie and I'm a student of Physics with Philosophy at the University of Manchester. I used to work with a bunch of people on a community-based church website. Recently we've been employed by a Thai Boxing company to build a community-based website as the hub of the various things this company will try and achieve. (So yes, currently we don't work with non-profits!). Currently its just a CMS but the community side of things will come (hopefully)
The team has released version 2.2.7 today. This release includes an important security update - and we recommend that you upgrade sites to this release as soon as possible. 2.2.7 also includes phase 1 of CiviReport - with 14 built-in report templates with coverage of contact data, contributions, events and memberships. Stay tuned for a separate blog post with lots more details on the new reporting features.