title: Set button variable based on loaded view/url using Djangos Template Language? Python
body: <p>In my <code>base.html</code> template I have a link to a website that I would like displayed at the top of each page that extends it:</p>
  
  <pre><code>base.html
  &lt;a href='websiteOne' class="btn btn-default btn-sm"&gt;Results&lt;/a&gt;
  </code></pre>
  
  <p>Except for <code>results.html</code>, when I load that page I would like the link loaded as:</p>
  
  <pre><code>results.html
  &lt;a href='websiteTwo' class="btn btn-default btn-sm"&gt;Home&lt;/a&gt;
  </code></pre>
  
  <p>I'm under the impression that the template language could solve my problem with an <code>if</code> statement:</p>
  
  <pre><code>if currentTemplate/urlRoute != results.html:
      button = &lt;a href='websiteOne' class="btn btn-default btn-sm"&gt;Results&lt;/a&gt;
  else:
      button = &lt;a href='websiteTwo' class="btn btn-default btn-sm"&gt;Home&lt;/a&gt;
  </code></pre>
  
  <p>Please help point me in the right direction to implement this if possible :)</p>
  
  <p>Thanks :)</p>