title: Getting the page url within a block in Wagtail
body: <p>Using Wagtail 2.9, I am trying to create a block that allows to share its text content to Twitter. The block itself is straightforward:</p>
  
  <pre class="lang-py prettyprint-override"><code>class QuotableShare(StructBlock):
      text = TextBlock(required=True)
  
      class Meta:
          icon = 'fa-twitter'
          template = 'blocks/quotable_share.html'
  </code></pre>
  
  <p>However, I would like to have access to the URL of the page where the block appears, to include it as a link in the message to be shared. Within the <code>quotable_share.html</code> template, I've tried: </p>
  
  <pre class="lang-py prettyprint-override"><code>{{ request.get_full_path }}
  {{ request.path }}
  {{ request.full_path }}
  </code></pre>
  
  <p>But none gave me access to the page URL. </p>
  
  <p>Is there a way of accessing the URL without passing it as a template variable while iterating through the StreamField blocks? </p>