Reputation: 11
I have two blue prints for the space content type in OA. On the toolbar dropdown i want to show only the spaces created using the default blue print. AO uses the oa_core_get_groups_by_user_access(found in OA core module in the oa_core.util.inc file) to pull all spaces a use subscribed to. I want to alter this function to show only spaces created using the default blue print by altering the query used in this function.
All my attempts to do so have failed probably because i don't understand the drupal database abstraction queries. Can someone help me with the piece of code i can add to this function to achieve this functionality.
Upvotes: -1
Views: 103
Reputation: 11
Finally got it. To show only the default spaces in the dropdown, you have to make changes to the oa_core_get_titles function in the oa_core_util.inc file of oa_core.
Add the following line below line 641 of that particular file. $query->leftJoin('field_data_field_oa_space_type','t','n.nid=t.entity_id'); $query->condition('t.field_oa_space_type_tid',1);
This filters out only spaces created using the default space.
Upvotes: 0