Answers.Body: <p>Sometimes you can get clue from .tpl file form view source page. The other option is to find the page callback of the the url. Each CiviCRM url defined in menu xml file has a callback. The page callback gives the clue which file is being invoked. For eg civicrm/activity/view</p>
  
  <p>If you a grep 'civicrm/activity/view' on CRM/ and open the xml file you will see something like this</p>
  
  <pre><code>&lt;item&gt;
       &lt;path&gt;civicrm/activity/view&lt;/path&gt;
       &lt;title&gt;View Activity&lt;/title&gt;
       &lt;page_callback&gt;CRM_Activity_Form_ActivityView&lt;/page_callback&gt;
       &lt;access_arguments&gt;access CiviCRM&lt;/access_arguments&gt;
    &lt;/item&gt;
  </code></pre>
  
  <p>Which means the file CRM/Activity/Form/ActivityView.php is called in this situation.  </p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-10T10:37:08.317Z
Answers.Text: Thanks for the tip Pradeep. We'll have look this way!
Answers.UserDisplayName: Guillaume Sorel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-06-10T10:17:55.287Z
Answers.LastActivityDate: 2019-06-10T10:17:55.287Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Trying to modify the template and translate some hard coded Strings on Drupal 7, I couldn't really easily find the architecture of a page. With the debug mode I can read in the code which .tpl is being used but nothing for the .php files.</p>
  
  <p>Is there something like that in the documentation that I haven't yet found? or somewhere else?</p>
  
Tags: <files>
Title: How do I identify the right .php page
ThreadText: # How do I identify the right .php page
  
  (Asked by: username_0 on 2019-06-10)
  
  Trying to modify the template and translate some hard coded Strings on Drupal 7, I couldn't really easily find the architecture of a page. With the debug mode I can read in the code which .tpl is being used but nothing for the .php files.
  
  Is there something like that in the documentation that I haven't yet found? or somewhere else?
  
  **Tags:** files
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-06-10. Score: 2
  
  Sometimes you can get clue from .tpl file form view source page. The other option is to find the page callback of the the url. Each CiviCRM url defined in menu xml file has a callback. The page callback gives the clue which file is being invoked. For eg civicrm/activity/view
  
  If you a grep 'civicrm/activity/view' on CRM/ and open the xml file you will see something like this
  
  ```
  <item>
       <path>civicrm/activity/view</path>
       <title>View Activity</title>
       <page_callback>CRM_Activity_Form_ActivityView</page_callback>
       <access_arguments>access CiviCRM</access_arguments>
    </item>
  
  ```
  
  Which means the file CRM/Activity/Form/ActivityView.php is called in this situation.
  
  HTH
  
  username_1
  
  > **Comments:**
  > **username_0**: Thanks for the tip username_1. We'll have look this way!  
  
  ---
  
  