Answers.Body: <p>I've found the parameter to set to url to show Contributions Tab by default (<strong>force=1</strong> &amp; <strong>selectedChild=contribute</strong>):</p>
  
  <pre><code>http://&lt;my_site&gt;/civicrm/contact/view?reset=1&amp;cid=&lt;contact_id&gt;&amp;force=1&amp;selectedChild=contribute
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-03T07:56:23.513Z
Answers.LastActivityDate: 2017-10-03T08:05:08.647Z
Answers.LastEditDate: 2017-10-03T08:05:08.647Z
Answers.UserDisplayName: luciano_s
Answers.Body: <p>With the most recent changes it's actually a lot easier. None of the solutions above worked for my situation (when someone clicks on a Contact they wanted Contributions tab to just appear).</p>
  <p>With a little custom extension you can do this fairly easy</p>
  <pre><code>function wecancustom_civicrm_pageRun(&amp;$page) {
    $pageName = get_class($page);
  
    // Switch the tab to Contributions
    if ($pageName == 'CRM_Contact_Page_View_Summary') {
      CRM_Core_Resources::singleton()
      -&gt;addSetting([
        'tabSettings' =&gt; ['active' =&gt; CRM_Utils_Request::retrieve('selectedChild', 'contribute')],
      ]);
    }
  }
  </code></pre>
  <p>This overrides the default. In our case, I did a bit more processing to determine if it was the proper Contact type we wanted with Apiv4.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-05T18:43:46.950Z
Answers.LastActivityDate: 2022-08-05T18:43:46.950Z
Answers.UserDisplayName: shaneonabike
Answers.Body: <p>I don't think CiviCRM allows this out of the box, but you can achieve this by following the below steps using JavaScript:</p>
  
  <ol>
  <li><p>Using JavaScript check to see if the page url have '/civicrm/contact/view?reset=1&amp;cid='</p></li>
  <li><p>Then set below two attributes in <li> to true:</p>
  
  <p><code>aria-selected="true"
   aria-expanded="true"
  </code>
  Where <code>id = tab_contribute</code></p></li>
  </ol>
  
  <p>Example:</p>
  
  <p><code>&lt;li id="tab_contribute" class="crm-tab-button ui-corner-all livePage ui-tabs-tab ui-corner-top ui-state-default ui-tab ui-tabs-active ui-state-active crm-count-1" role="tab" tabindex="0" aria-controls="ui-id-23" aria-labelledby="ui-id-22" aria-selected="true" aria-expanded="true"&gt;</code></p>
  
  <p>If your CMS is drupal, you can use <a href="https://www.drupal.org/project/js_injector" rel="nofollow noreferrer">JS Injector</a> module to include javascript which provides functionality to run JS on specific pages.</p>
  
  <p>Let me know if you need more help.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-02T17:07:11.590Z
Answers.LastActivityDate: 2017-10-02T17:07:11.590Z
Answers.UserDisplayName: Hassan Farooq
Body: <p>If I want to access to a Contact Summary Page, I go to url:</p>
  
  <pre><code>http://&lt;my_site&gt;/civicrm/contact/view?reset=1&amp;cid=&lt;contact_id&gt;
  </code></pre>
  
  <p>Is there any parameter I can add to url (or other way) where I can access to this Contact Summary Page but showing the Contributions Tab by default?</p>
  
Tags: <civicontribute><contacts>
Title: How to show by default Contributions Tab in Contact Summary Page?
ThreadText: # How to show by default Contributions Tab in Contact Summary Page?
  
  (Asked by: username_0 on 2017-10-02)
  
  If I want to access to a Contact Summary Page, I go to url:
  http:///civicrm/contact/view?reset=1&cid=
  
  Is there any parameter I can add to url (or other way) where I can access to this Contact Summary Page but showing the Contributions Tab by default?
  
  **Tags:** civicontribute, contacts
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2017-10-03. Score: 3 | Accepted answer
  
  I've found the parameter to set to url to show Contributions Tab by default (force=1 & selectedChild=contribute):
  http:///civicrm/contact/view?reset=1&cid=&force=1&selectedChild=contribute
  
  
  ---
  
  ### Answer by username_1 on 2022-08-05. Score: 2
  
  With the most recent changes it's actually a lot easier. None of the solutions above worked for my situation (when someone clicks on a Contact they wanted Contributions tab to just appear).
  With a little custom extension you can do this fairly easy
  function wecancustom_civicrm_pageRun(&$page) {
    $pageName = get_class($page);
  
    // Switch the tab to Contributions
    if ($pageName == 'CRM_Contact_Page_View_Summary') {
      CRM_Core_Resources::singleton()
      ->addSetting([
        'tabSettings' => ['active' => CRM_Utils_Request::retrieve('selectedChild', 'contribute')],
      ]);
    }
  }
  
  This overrides the default. In our case, I did a bit more processing to determine if it was the proper Contact type we wanted with Apiv4.
  
  
  ---
  
  ### Answer by username_2 on 2017-10-02. Score: 1
  
  I don't think CiviCRM allows this out of the box, but you can achieve this by following the below steps using JavaScript:
  
  1. Using JavaScript check to see if the page url have '/civicrm/contact/view?reset=1&cid='
  2. Then set below two attributes in- to true:
  
     `aria-selected="true"
     aria-expanded="true"`
     Where `id = tab_contribute`
  
  Example:
  
  If your CMS is drupal, you can use [JS Injector](https://www.drupal.org/project/js_injector) module to include javascript which provides functionality to run JS on specific pages.
  
  Let me know if you need more help.
  
  
  ---
  
  