#129 De-duplicate the "Read more" link if it already appears in the long_form content.
Merged 8 years ago by ralph. Opened 8 years ago by ralph.

@@ -35,7 +35,7 @@ 

                {% endif %}

                <div class="media-body">

                    {{constituent['long_form']}}

-                     {% if constituent['link'] %}

+                     {% if constituent['link'] and constituent['link'] not in constituent['long_form'] %}

                      <a href="{{constituent['link']}}" target="_blank">

                          Read more <span class="glyphicon glyphicon-new-window"></span>

                      </a>

no initial comment

Some blog posts already have a link to themselves, in which case we display their link and our link. It looks clunky.

This checks to see if the long form content already has the link in it. If it does.. don't display a second duplicate link. If it does not, then be helpful and add a link of our own.

Pull-Request has been merged by ralph

8 years ago
Metadata