title: Create an anchor link in Java Tapestry using t:pagelink and context
body: <p>I can create a link to a page using this .tml code. This generates a link to eg "/path/case314":</p>
  
  <pre><code>&lt;t:pagelink page="${pageName}" t:context="case"&gt;
  linked text                             
  &lt;/t:pagelink&gt;
  </code></pre>
  
  <p>I want to create a path to eg "/path/case314#comment-id-90".</p>
  
  <p>If I try to direct my link to an anchor within a page, like so (where there is a div of id #comment-id-${currentComment.id} in the targeted page): </p>
  
  <pre><code>&lt;t:pagelink page="${pageName}#comment-id-${currentComment.id}" t:context="case"&gt;
  linked text                             
  &lt;/t:pagelink&gt;
  </code></pre>
  
  <p>Then I lose my context, and I get the default pageName path, like so: "/path/caseexample#comment-id-90". Which doesn't exist, so Tapestry throws an exception.</p>
  
  <p>The same thing happens if I try to create a class manually constructing the link- passing pageName as a parameter results in "caseexample" rather than the correct "case314". </p>
  
  <p>Can anyone tell me how I can build an anchor link while maintaining the necessary context for the pagelink to work?</p>
  
  <p>Thank you!</p>