Answers.Body: <p>I think you can just use <code>$contactUrl</code> instead of <code>$smarty.capture.contactUrl</code></p>
  <p>Try replacing the last line with:</p>
  <pre><code>&lt;a href=&quot;{$contactUrl}&quot;&gt;View Contact's Jobs&lt;/a&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-28T09:58:19.930Z
Answers.LastActivityDate: 2024-03-28T09:58:19.930Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>I'm trying to do something like the following in my extension's template:</p>
  <pre><code>{capture assign=contactUrl}{crmURL p='civicrm/contact/view' q=&quot;reset=1&amp;id=`$contactId`&amp;selectedChild=jobs&quot; h=0}{/capture}
  &lt;a href=&quot;{$smarty.capture.contactUrl}&quot;&gt;View Contact's Jobs&lt;/a&gt;
  </code></pre>
  <p>But the selectedChild does not show up on the resulting URL. We do have a contact summary tab for Jobs in our case (part of the extension), and it does work if I hand type that parameter into the url. But not in smarty.</p>
  <p>What is the right way to assign the correct crmURL (so the right URL works with any CMS) with the selectedChild parameter included? Or is this method no longer how we can direct to a specific tab on the contact summary page?</p>
  
Tags: <extension>
Title: crmURL with selectedChild parameter?
ThreadText: # crmURL with selectedChild parameter?
  
  (Asked by: username_0 on 2024-03-27)
  
  I'm trying to do something like the following in my extension's template:
  {capture assign=contactUrl}{crmURL p='civicrm/contact/view' q="reset=1&id=`$contactId`&selectedChild=jobs" h=0}{/capture}
  View Contact's Jobs
  
  But the selectedChild does not show up on the resulting URL. We do have a contact summary tab for Jobs in our case (part of the extension), and it does work if I hand type that parameter into the url. But not in smarty.
  What is the right way to assign the correct crmURL (so the right URL works with any CMS) with the selectedChild parameter included? Or is this method no longer how we can direct to a specific tab on the contact summary page?
  
  **Tags:** extension
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-03-28. Score: 1
  
  I think you can just use $contactUrl instead of $smarty.capture.contactUrl
  Try replacing the last line with:
  View Contact's Jobs
  
  
  ---
  
  