Answers.Body: <p>Rather than smarty, JavaScript will do the trick.  Those tabs are all separate pages, and you can load any CiviCRM page/form as a snippet instead.</p>
  
  <p>First, in your extension, use a hook to include the Javascript and provide the contact ID for it:</p>
  
  <pre><code>$r = CRM_Core_Resources::singleton()
  
  // Provide the contact ID (assuming you've got it handy)
  $r-&gt;addVars('memberTabInline', array('contactId' =&gt; $contactId));
  
  // Add the script
  $r-&gt;addScriptFile('com.example.membertabinline', 'membertabinline.js')
  </code></pre>
  
  <p>Then in membertabinline.js:</p>
  
  <pre><code>CRM.$(function($) {
    $.get(CRM.url('civicrm/contact/view/membership', {
      reset: 1,
      force: 1,
      cid: CRM.vars.memberTabInline.contactId,
      snippet: 1
    }), function(result) {
      $('#mainTabContainer').append(result);
    });
  });
  </code></pre>
  
  <p>You'll probably need to add a div or something and have this fill it so that you don't have the membership stuff appending multiple times, but this is the gist.</p>
  
  <p>Alternatively, you might look at <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms">https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms</a> to see if you can fill a wrapper with the tab and have it work.  I'm only familiar with this re: popups, but it looks like it might work within any element.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-21T22:32:33.247Z
Answers.Text: Cool - thanks for this - will try this out!
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-22T04:07:54.387Z
Answers.Text: I just tried this out and this works great - the entire - and I mean the entire - content of the Membership tab is now position (with .prepend(result) on my contact view page for my contactId. Learned something. Merci Andrew!
Answers.UserDisplayName: KarinG - Semper IT
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-29T21:38:24.730Z
Answers.Text: CiviCRM never ceases to amaze me ... was looking for answer on an unrelated topic and stumbled on this, thanks Karin and Andrew for this Q&A!
Answers.UserDisplayName: cividesk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-21T22:09:41.117Z
Answers.LastActivityDate: 2016-07-21T22:09:41.117Z
Answers.UserDisplayName: Andie Hunt
Body: <p>Specifically -> I'd like to see what's in the Membership Tab -> Inline instead. I'd like that table with Active Memberships printed right at the top underneath the Display Name on civicrm/contact/view?reset=1&amp;cid=xxx</p>
  
  <p>When you add a Custom Data Set/Field you get a choice between Tab and Inline. Which is very cool. But how to go about switching a Core Tab -> Inline?</p>
  
  <p>It's not as simple as finding the tpl - and then injecting that into the CRM/Contact/Page/View/Summary.tpl - as the $ variables aren't known. I don't really want to be copying phps bit over - I think? </p>
  
Tags: <smarty><javascript><contact-view>
Title: How to go about making a Core Tab on the Contact Summary screen view Inline instead?
ThreadText: # How to go about making a Core Tab on the Contact Summary screen view Inline instead?
  
  (Asked by: username_0 on 2016-07-21)
  
  Specifically -> I'd like to see what's in the Membership Tab -> Inline instead. I'd like that table with Active Memberships printed right at the top underneath the Display Name on civicrm/contact/view?reset=1&cid=xxx
  
  When you add a Custom Data Set/Field you get a choice between Tab and Inline. Which is very cool. But how to go about switching a Core Tab -> Inline?
  
  It's not as simple as finding the tpl - and then injecting that into the CRM/Contact/Page/View/Summary.tpl - as the $ variables aren't known. I don't really want to be copying phps bit over - I think?
  
  **Tags:** smarty, javascript, contact-view
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-21. Score: 5 | Accepted answer
  
  Rather than smarty, JavaScript will do the trick. Those tabs are all separate pages, and you can load any CiviCRM page/form as a snippet instead.
  
  First, in your extension, use a hook to include the Javascript and provide the contact ID for it:
  
  ```
  $r = CRM_Core_Resources::singleton()
  
  // Provide the contact ID (assuming you've got it handy)
  $r->addVars('memberTabInline', array('contactId' => $contactId));
  
  // Add the script
  $r->addScriptFile('com.example.membertabinline', 'membertabinline.js')
  
  ```
  
  Then in membertabinline.js:
  
  ```
  CRM.$(function($) {
    $.get(CRM.url('civicrm/contact/view/membership', {
      reset: 1,
      force: 1,
      cid: CRM.vars.memberTabInline.contactId,
      snippet: 1
    }), function(result) {
      $('#mainTabContainer').append(result);
    });
  });
  
  ```
  
  You'll probably need to add a div or something and have this fill it so that you don't have the membership stuff appending multiple times, but this is the gist.
  
  Alternatively, you might look at <https://wiki.civicrm.org/confluence/display/CRMDOC/Ajax+Pages+and+Forms> to see if you can fill a wrapper with the tab and have it work. I'm only familiar with this re: popups, but it looks like it might work within any element.
  
  > **Comments:**
  > **username_0**: Cool - thanks for this - will try this out!  
  > **username_0**: I just tried this out and this works great - the entire - and I mean the entire - content of the Membership tab is now position (with .prepend(result) on my contact view page for my contactId. Learned something. Merci Andrew!  
  > **username_2**: CiviCRM never ceases to amaze me ... was looking for answer on an unrelated topic and stumbled on this, thanks Karin and Andrew for this Q&A!  
  
  ---
  
  