I have created a new plugin structure using civix. It has created the elements I wanted in the database.

I have used dogregistry_civicrm_tabset to add a tab to my contacts pages. I used civix to create a page with a php file and a tpl file.

The question I have is how do I transfer a value to the page php file? I would like to send it contact ID so I can query the database for the entries for that contact but I'm not sure how to do that or whether it is stored already in a variable I can tap into?

Thanks for your help. Norm

1 Answer 1


Ok, I think I figured this bit out by using...

$this->_contactId = CRM_Utils_Request::retrieve(...

and making sure the calling url has cid={$contactId} included. I'm getting the contactID in the php code, which will allow me to execute the queries and such I need to list out the details.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.