Ver código fonte

Merge pull request #97 from wagtail/95_fix_cta_link

Fix link to Hero CTA from homepage
Edd Baldry 8 anos atrás
pai
commit
544d543fa4
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      bakerydemo/templates/base/home_page.html

+ 4 - 2
bakerydemo/templates/base/home_page.html

@@ -1,5 +1,5 @@
 {% extends "base.html" %}
-{% load wagtailimages_tags %}
+{% load wagtailimages_tags wagtailcore_tags %}
 
 {% block content %}
 <div class="homepage">
@@ -12,7 +12,9 @@
             <div class="col-md-8 col-md-offset-2 home-hero">
                 <h1>{{ page.title }}</h1>
                 <p class="lead">{{ page.hero_text }}</p>
-                <a href="{{ page.hero_cta_link }}" class="hero-cta-link hvr-icon-forward">{{ page.hero_cta }}</a>
+                <a href="{% pageurl page.hero_cta_link %}" class="hero-cta-link hvr-icon-forward">
+                    {{ page.hero_cta }}
+                </a>
             </div>
         </div>
     </div>