diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index 629823b7d..d2f82a88e 100644 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -797,6 +797,9 @@ class LinkInfoPage(Reddit): self.subtitle = subtitle + if self.link.shortlink: + self.shortlink = self.link.shortlink + # if we're already looking at the 'duplicates' page, we can # avoid doing this lookup twice if duplicates is None: diff --git a/r2/r2/templates/base.compact b/r2/r2/templates/base.compact index 9608b0061..00a578575 100644 --- a/r2/r2/templates/base.compact +++ b/r2/r2/templates/base.compact @@ -31,6 +31,9 @@ + %if hasattr(thing, "shortlink"): + + %endif ${self.Title()} diff --git a/r2/r2/templates/reddit.html b/r2/r2/templates/reddit.html index 698aa459c..9dc2d7e5c 100644 --- a/r2/r2/templates/reddit.html +++ b/r2/r2/templates/reddit.html @@ -62,6 +62,10 @@ %endif %endif + %if hasattr(thing, "shortlink"): + + %endif + %if c.allow_styles and c.site.stylesheet_contents: <% inline_stylesheet = ( len(c.site.stylesheet_contents) < 1024