Hi guys,

I have a neat website with the body (content) of the page in a narrow (about 500px) area. The problem is that some feeds offer news URLs that are at length (with some large random identifier).

I have an image attached so you can see the result.

What I have done to fix the problem, at this time, is copy the aggregator source template PHP file and fix the print $source_url; to make sure that over a certain size the URL is cut. (like with the _filter_trim() function)

What I think would be neat is to add a way to define the maximum length (like with the URL filters) and give the aggregator source template another variable called $caption that we could use as the URL caption.

  <div class="feed-url">
    <em>??php print t('URL:'); ??</em> <a href="??php print $source_url; ??">
    ??php
      if (strlen($source_url) > 55) {
        echo substr($source_url, 0, 55), "...";
      }
      else {
        print $source_url;
      }
    ??
    </a>
  </div>

And if the module was to offer a $caption, the condition would simply become print $caption.

Thank you.
Alexis Wilke

CommentFileSizeAuthor
Google-URL.png377.99 KBAlexisWilke

Comments

avpaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this bug report, as it's for a not supported project version. If the bug is reproducible on a supported project version, please re-open this issue.