CodeGarden 10: The sixth annual Umbraco Developer Conference
June 23-25th 2010 - free ASP.NET MVC pre-conference. Register today!

Auto Link

Version: 1.0.1, Stable

Download Auto Link, 1.0.1

Project Summary

Project owner:
Darren Ferguson
Created:
1/20/2010
Is Stable:
Project is stable
Current version
1.0.1
License
MIT
Tags
link  auto 
Downloads:
6

*** 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

Resources

Attached files

Package discussions

Bug Reports
4 topics, 16 posts
Report any issues here
1 week ago by Stephan Kvart
Feature suggestions
1 topics, 2 posts
Suggest any enhancements here
8 weeks ago by Darren Ferguson
Misc
0 topics, 0 posts
Miscellaneous questions, discussion etc