Answers.Body: <p>As the example says, "you would create a url which would return an html snippet".</p>
  
  <p>Since this is in the context of a CiviCRM extension, please see the Civix documentation for <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addabasicwebpage" rel="nofollow">how to create a basic page.</a></p>
  
  <p>The url of your tab should be whatever you decide the url of that page should be.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T16:42:26.873Z
Answers.Text: I create an extension, but my new tab doesn't redirect to another page.  my xml file is in the same file as my hook.  My hook is develop as a plugin and my extension folder is in files/civicrm.
Answers.UserDisplayName: Nilda Cervantes
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-11T14:18:48.050Z
Answers.LastActivityDate: 2015-04-11T14:18:48.050Z
Answers.UserDisplayName: Coleman
Body: <p>I am new to writing an extension.</p>
  
  <p>I add a tab in my contact with this example</p>
  
  <pre><code>function civitest_civicrm_tabs( &amp;$tabs, $contactID ) {
  
    // unset the contribition tab, i.e. remove it from the page
    unset( $tabs[1] );
  
    // let's add a new "contribution" tab with a different name and put it last
    // this is just a demo, in the real world, you would create a url which would
    // return an html snippet etc.
    $url = CRM_Utils_System::url( 'civicrm/contact/view/contribution', "reset=1&amp;snippet=1&amp;force=1&amp;cid=$contactID" );
    $tabs[] = array( 'id' =&gt; 'mySupercoolTab', 'url' =&gt; $url, 'title' =&gt; 'Contribution Tab Renamed', 'weight' =&gt; 300 );
  }
  </code></pre>
  
  <p>What should be the next step to add a content in the tab?</p>
  
  <p>how I have to use the extension and add where I have to create a new file to show all the content.</p>
  
  <p>Please can you provide me an example</p>
  
  <p>Thank You</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-10T20:43:20.933Z
Comments.Text: Are you writing an extension, or... ?
Comments.UserDisplayName: Coleman
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-10T23:16:19.260Z
Comments.Text: can you please elaborate a bit more. In general, civi will always pick a specific template for a specific url (i.e. the url -> template mapping is fixed and deterministic)
Comments.UserDisplayName: Donald Lobo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-04-13T13:41:31.150Z
Comments.Text: Hi Nilda, please post the same question only once. You can edit it if you want to change something.
Comments.UserDisplayName: Joe Murray
Tags: <wordpress><extension>
Title: What else is needed to create new tab for content in extension?
ThreadText: # What else is needed to create new tab for content in extension?
  
  (Asked by: username_0 on 2015-04-10)
  
  I am new to writing an extension.
  
  I add a tab in my contact with this example
  
  ```
  function civitest_civicrm_tabs( &$tabs, $contactID ) {
  
    // unset the contribition tab, i.e. remove it from the page
    unset( $tabs[1] );
  
    // let's add a new "contribution" tab with a different name and put it last
    // this is just a demo, in the real world, you would create a url which would
    // return an html snippet etc.
    $url = CRM_Utils_System::url( 'civicrm/contact/view/contribution', "reset=1&snippet=1&force=1&cid=$contactID" );
    $tabs[] = array( 'id' => 'mySupercoolTab', 'url' => $url, 'title' => 'Contribution Tab Renamed', 'weight' => 300 );
  }
  
  ```
  
  What should be the next step to add a content in the tab?
  
  how I have to use the extension and add where I have to create a new file to show all the content.
  
  Please can you provide me an example
  
  Thank You
  
  **Tags:** wordpress, extension
  
  > **Comments:**
  > **username_1**: Are you writing an extension, or... ?  
  > **username_2**: can you please elaborate a bit more. In general, civi will always pick a specific template for a specific url (i.e. the url -> template mapping is fixed and deterministic)  
  > **username_3**: Hi username_0, please post the same question only once. You can edit it if you want to change something.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-11. Score: 1
  
  As the example says, "you would create a url which would return an html snippet".
  
  Since this is in the context of a CiviCRM extension, please see the Civix documentation for [how to create a basic page.](http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addabasicwebpage)
  
  The url of your tab should be whatever you decide the url of that page should be.
  
  > **Comments:**
  > **username_0**: I create an extension, but my new tab doesn't redirect to another page.  my xml file is in the same file as my hook.  My hook is develop as a plugin and my extension folder is in files/civicrm.  
  
  ---
  
  