9 votes

Auto Link

*** Note: 1.0.1 is a patch release. 1.0 must be installed first ***

Automatically inject links into content based on configuration.

Please watch the demonstration screencast for more information.

Post install in a template you can do this:

<xsl:value-of select="fmautolink:Link($currentPage/data[@alias = 'bodyText'])" disable-output-escaping="yes"/>

The following example input:

<p>

I've been invited to participate in a Microsoft initiative in which they will sponsor the development of some packages for Umbraco. These packages will showcase Microsoft technologies and is part of a wider effort to engage with Open source communities.

 

</p>

Produces the following output:

<p>I've been invited to participate in a <a onclick="window.open(this.href); return false;" title="Microsoft" href="http://www.microsoft.com/">Microsoft</a> initiative in
which they will sponsor the development of some packages for
<a onclick="window.open(this.href); return false;" title="Umbraco - The friendly CMS" href="http://www.umbraco.org/">Umbraco</a>. These packages will showcase <a onclick="window.open(this.href); return false;" title="Microsoft" href="http://www.microsoft.com/">Microsoft</a> technologies and is
part of a wider effort to engage with Open source communities.</p>

Given the following config:

<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Links>
    <Href>http://www.umbraco.org/</Href>
    <Phrases>
      <Value>Umbraco</Value>
    </Phrases>
    <LinkAttributes>
      <Name>target</Name>
      <Value>_blank</Value>
    </LinkAttributes>
    <LinkAttributes>
      <Name>title</Name>
      <Value>Umbraco - The Friendly CMS</Value>
    </LinkAttributes>
  </Links>
  <Links>
    <Href>http://www.microsoft.com</Href>
    <Phrases>
      <Value>Microsoft</Value>
    </Phrases>
    <LinkAttributes>
      <Name>target</Name>
      <Value>_blank</Value>
    </LinkAttributes>
    <LinkAttributes>
      <Name>title</Name>
      <Value>Microsoft Corporation</Value>
    </LinkAttributes>
  </Links>

</Configuration>

Screenshots

Download package

Project owner

Darren Ferguson

Darren Ferguson

Darren has 2832 karma points

Project Compatibility

This project is compatible with the following versions as reported by community members who have downloaded this package:
7.2.x (untested)
7.1.x (untested)
7.0.x (untested)
6.1.x (untested)
6.0.x (untested)
4.11.x (untested)
4.10.0 (untested)
4.9.1 (untested)
4.9.0 (untested)

You must login before you can report on package compatibility.

Project Information

  • Project owner: Darren Ferguson
  • Created: 20/01/2010
  • Is Stable: True
  • Current version 1.0.1
  • License MIT
  • Tags link
  • Downloads: 1765

External resources

Our.umbraco.org is the community mothership for Umbraco, the open source asp.net cms. With a friendly forum for all your questions, a comprehensive documentation and a ton of packages from the community.