10 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

Package owner

Darren Ferguson

Darren Ferguson

Darren has 3259 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Darren Ferguson
  • Created: 20/01/2010
  • Current version 1.0.1
  • License MIT
  • Downloads on Our: 2.6K