title: typolink: set page type for internal links on condition
body: <p>how can i create a typolink which:</p>
  
  <ul>
  <li>reads it's target from a column in <code>tt_content</code> (like <code>header_link</code> f.e.)</li>
  <li>applies a page type to internal links, but obviously not to external links</li>
  </ul>
  
  <p>f.e., given the values <code>42</code> and <code>https://x.org</code> in <code>header_link</code> the desired links should look like:</p>
  
  <pre><code>/&lt;path_to_page_id 42&gt;?type=5
  https://x.org
  </code></pre>
  
  <p>i can't figure out how to apply the page type on the condition internal/external link. this is what i got:</p>
  
  <pre><code>text = TEXT
  text.value = click here ;-)
  
  text.stdWrap.typolink {
    parameter.field = header_link
  
    # following line should only apply if `header_link` is an internal link
    parameter.wrap = |,5
  }
  </code></pre>
  
  <p><strong>edit to clarify</strong>:
  above code produces:</p>
  
  <pre><code>/&lt;path_to_page_id 42&gt;?type=5
  https://x.org,5                 &lt;-- not what i want
  </code></pre>
  
  <p>how do i get the page type for internal links and leave external links untouched?</p>