[development] links best practices (was Re: internal link filter
...)
Ray Zimmerman
rz10 at cornell.edu
Wed Jul 26 02:22:29 UTC 2006
An update ...
On Jul 13, 2006, at 12:59 PM, Ray Zimmerman wrote:
> On Jul 13, 2006, at 8:22 AM, Syscrusher wrote:
>> As the maintainer of the Links package, I'd be happy to work with
>> you to get
>> this functionality integrated into Links. Please take a look at
>> what we have
>> so far, in contributions/modules/links (CVS HEAD branch), and let
>> me know if and
>> how you think your feature could integrate in.
>
> Thanks, Scott. I'll warn you up front that this e-mail widens the
> scope beyond the initial discussion, which was limited to a simple
> input filter that could properly handle the base_url issues for
> internal references in content.
For this simple case (no Links API integration), I whipped together a
filter that you can download from ...
http://www.pserc.cornell.edu/temp/ilink_filter.module
It replaces [ipath] and [ilink] tokens as follows, for a site whose
base_url is "http://example.com/drupal":
[ipath:node/99] --> http://example.com/drupal/node/99
[ilink:node/99] --> <a href="http://example.com/base_url/node/
99">http://example.com/drupal/node/99</a>
[ilink:node/99:My Text] --> <a href="http://example.com/drupal/node/
99">My Text</a>
If the drupal path has an alias, the alias is used instead of the
original path.
Comments are welcome, and I'll be happy to apply for CVS access and
create a project for it, if others would find it useful.
> I'm interested in moving toward a consistent best-practices
> approach to handling all of my links in drupal, including the
> internal links, and I believe having all of them handled by the
> Links API [1] seems like the way to go. However, for me there are
> several missing pieces, some probably at the API level and others
> at a higher level.
>
> Here is a summary of what I think is needed:
>
> (1) link API handling of internal references as well as external
> URLs [2]
Check. I realize now this was not a missing feature. There was a
simple bug, now fixed, that prevented it from working 100% for me.
Ray
More information about the development
mailing list