Answers.Body: <p>If you are planning on submitting a change to CiviCRM, then modifying this file may be what you want to do to modify the existing behaviour. Clearing CiviCRM's caches (Administer → System Settings → Cleanup Caches and Update Paths) will reload those callbacks as defined in the XML. But: <strong>You probably don't want to do this</strong> :)</p>
  
  <p>If you're hoping to customise your CiviCRM install <em>and</em> be able to keep your site upgraded in future, <strong>stop now</strong>. Instead I recommend you look into how to write a custom CiviCRM extension for your site, which packages your changes separately from the main codebase.</p>
  
  <p>By writing an extension using CiviCRM's published interfaces, you can upgrade to the next release more easily. On your current path you'll soon be maintaining a modified version of the CiviCRM codebase, which will introduce more and more upgrade challenges, leaving you / your client in a more difficult position.</p>
  
  <ul>
  <li><a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference" rel="nofollow">CiviCRM hook reference</a> lists your entry points for modifying CiviCRM behaviour</li>
  <li><a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension" rel="nofollow">Create a CiviCRM extension</a> shows you how to get up and running</li>
  <li><a href="https://github.com/totten/civix" rel="nofollow"><code>civix</code></a> is a tool to get you there faster</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-28T23:15:38.220Z
Answers.Text: Thanks very much for your detailed recommendations, @Chris. What if I would like to introduce a change in the Civi codebase because I think the current behavior leads to undesirable results? A big part of my motivation to submit patches/changes to the core codebase is so that all organizations could benefit from the improvements. Would you still recommend creating an extension in that case?
Answers.UserDisplayName: Borislav Zlatanov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-29T02:44:55.523Z
Answers.Text: In that case, definitely submit as an improvement! Open an issue in [JIRA](https://issues.CiviCRM.Org) with your motivations, [submit a PR via github](http://wiki.civicrm.org/confluence/display/CRMDOC/Contributing+to+CiviCRM+using+GitHub), link to it from the issue.
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-28T19:09:56.333Z
Answers.LastActivityDate: 2015-12-28T19:09:56.333Z
Answers.UserDisplayName: Chris Burgess
Body: <p>The file defines paths and callbacks, e.g.:</p>
  
  <p><code>&lt;item&gt;
      &lt;path&gt;civicrm/mailing/optout&lt;/path&gt;
      &lt;title&gt;Opt-out&lt;/title&gt;
      &lt;page_callback&gt;CRM_Mailing_Form_Optout&lt;/page_callback&gt;
      &lt;access_arguments&gt;access CiviMail subscribe/unsubscribe pages&lt;/access_arguments&gt;
      &lt;is_public&gt;true&lt;/is_public&gt;
      &lt;weight&gt;650&lt;/weight&gt;
    &lt;/item&gt;</code></p>
  
  <p>However, changing values in the file doesn't seem to produce any result. I changed the page callback above to CRM_Mailing_Page_Optout but the content served was again coming from CRM_Mailing_Form_Optout. </p>
  
  <p>So how can I make any changes to the callbacks? </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-12-27T09:09:24.780Z
Comments.Text: Check it after clearing the civicrm temporary files.
Comments.UserDisplayName: Prem Patel
Tags: <civimail>
Title: How does the /civicrm/CRM/Mailing/xml/Menu/Mailing.xml file work?
ThreadText: # How does the /civicrm/CRM/Mailing/xml/Menu/Mailing.xml file work?
  
  (Asked by: username_0 on 2015-12-25)
  
  The file defines paths and callbacks, e.g.:
  
  `civicrm/mailing/optout
  Opt-out
  CRM_Mailing_Form_Optout
  access CiviMail subscribe/unsubscribe pages
  true
  650`
  
  However, changing values in the file doesn't seem to produce any result. I changed the page callback above to CRM\_Mailing\_Page\_Optout but the content served was again coming from CRM\_Mailing\_Form\_Optout.
  
  So how can I make any changes to the callbacks?
  
  **Tags:** civimail
  
  > **Comments:**
  > **username_1**: Check it after clearing the civicrm temporary files.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-12-28. Score: 2
  
  If you are planning on submitting a change to CiviCRM, then modifying this file may be what you want to do to modify the existing behaviour. Clearing CiviCRM's caches (Administer → System Settings → Cleanup Caches and Update Paths) will reload those callbacks as defined in the XML. But: **You probably don't want to do this** :)
  
  If you're hoping to customise your CiviCRM install *and* be able to keep your site upgraded in future, **stop now**. Instead I recommend you look into how to write a custom CiviCRM extension for your site, which packages your changes separately from the main codebase.
  
  By writing an extension using CiviCRM's published interfaces, you can upgrade to the next release more easily. On your current path you'll soon be maintaining a modified version of the CiviCRM codebase, which will introduce more and more upgrade challenges, leaving you / your client in a more difficult position.
  
  * [CiviCRM hook reference](http://wiki.civicrm.org/confluence/display/CRMDOC/Hook+Reference) lists your entry points for modifying CiviCRM behaviour
  * [Create a CiviCRM extension](http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension) shows you how to get up and running
  * [`civix`](https://github.com/totten/civix) is a tool to get you there faster
  
  > **Comments:**
  > **username_0**: Thanks very much for your detailed recommendations, @Chris. What if I would like to introduce a change in the Civi codebase because I think the current behavior leads to undesirable results? A big part of my motivation to submit patches/changes to the core codebase is so that all organizations could benefit from the improvements. Would you still recommend creating an extension in that case?  
  > **username_2**: In that case, definitely submit as an improvement! Open an issue in [JIRA](https://issues.CiviCRM.Org) with your motivations, [submit a PR via github](http://wiki.civicrm.org/confluence/display/CRMDOC/Contributing+to+CiviCRM+using+GitHub), link to it from the issue.  
  
  ---
  
  