Written by Tobias Gesellchen with help on the documentation by Marc Perkel.
TitleLink is a Joomla System Plugin to easily create links in Joomla content to other Joomla content by Title or Alias.
By inserting text into your content like {ln:Growing African Violets}
you link directly to your content with that title.
The purpose of this extension is to help create easy ways to drop links to content within the material that you are writing.
TitleLink is a must-have to link between Joomla! articles without using cryptic hyperlinks. TitleLink also minimizes the risk of breaking article links when changes are made to the target article. In contrast to other extensions TitleLink doesn't need the article ids to find your article - so you always get exactly the right links.
After installing the plugin through the extension manager be sure to publish the plugin to activate it. Publishing the plugin is the way you turn it on.
TitleLink is used by dropping shortcut references into your content that you are writing.
Suppose that you have written and published an article called "Growing African Violets".
You are now writing a new article about plants you can grow indoors, and you want to reference and link to your African Violet article.
You might use it this way: If you don't have a lot of natural light you might try {ln:Growing African Violets}.
Basically, you use the target article title and wrap it between two curly braces and the prefix ln:
, which is short for link:
.
When the web page is displayed it will link to your article on violets.
Suppose however that the text you want to display isn't the same as the title you want to link to.
You can do it this way: In low light I had good luck raising {ln:growing african violets 'violets} indoors.
This will show the link as "violets" but point to the content with the title "growing african violets".
Linking isn't case-sensitive, so you don't have to match case to make the link work.
Linking is not limited to the title. You can link to the title_alias field as well.
If you used the word "violets" by itself in the title_alias then all you would have to do to link to it is {ln:violets}
.
When using JoomFish you always have to keep in mind that the translated titles aren't found by TitleLink. That means you have to use the titles of the original articles even in the translated versions. TitleLink only finds the original article, JoomFish changes it to the translated one.
By default, TitleLink will retry a search in all installed and activated plugins as configured in the plugin configuration.
This second try will search for partial matches, so one could have an article titled "One Two Three",
and a TitleLink {ln:one two}
would find that article. To disable the retry, just use em:
(for "exact match") as in {ln:em:one two}
.
Using the title_alias can be more convenient, when you have similar articles with similar titles. In such cases
it can be useful not only for TitleLink to manually set a unique title_alias.
When the second try was a hit, TitleLink will use your partial phrase (e.g. "one two") as the displayed text.
To let TitleLink replace your phrase with the correct title of the article, use rep:
(for "replace") as option.
{ln:rep:one two}
would then create a link with "One Two Three" as displayed text.
TitleLink can be used as a shortcut for creating external links, too.
Rather than just putting a complete HTML anchor tag in your text you can easily turn it into a link as follows: {ln:https://github.com/gesellix/titlelink}
You can even have links open a new window with the nw:
modifier: {ln:nw:https://github.com/gesellix/titlelink}
Suppose however you want the link text to display something else. Here how you would do that: {ln:nw:https://github.com/gesellix/titlelink 'TitleLink at GitHub}
You can create links to google, yahoo, wikipedia or site-internal searches by using the keywords google
, yahoo
, wikipedia
or search
.
Other sites which support keywords are called by using the command search-<selector>
where <selector>
is one of the sites listed at the end of this document.
See the syntax and examples section for details!
TitleLink provides a syntax like follows. The examples use the default settings for prefix and suffix.
Parameters in square brackets [
and ]
are optional, angle brackets <
and >
are obligatory.
The vertical bar |
tells you to choose one of the options linked together. See the examples for a less technical description.
{ln[:][debug:][nw:][op:][css-<class>:][search-<selector>:][append-<to append>:][limitstart-<page>][itemid-<id>:][<search|google|yahoo|wikipedia|em|rep>:]<link/phrase>[ '<text to display>[ ''<tooltip to display>]]}
- nw:
- "new window" - open links in a new window
- op:
- "keep tag open" - supress the closing "</a>". Useful, when you like to add some inner HTML content.
- css-<class>:
- set a css-class "<class>"
- search-<selector>:
- create a link to an external site/search engine. See below for supported <selector>s
- append-<to append>:
- append to the link, useful for anchors like in https://www.example.com/index.php#anchor
- limitstart-<page>:
- selects the page of an article with several pages. <page> starts with 1, which would be the first page of the article (index 0)
- itemid-<id>:
- appends <id>, when TitleLink wasn't able to get an itemid by Joomla!
- search:
- create a link to a site-internal search
- google/yahoo:
- create link to a search by the search engine
- wikipedia:
- create a search link for the english version of the wikipedia
- em:
- "exact match" - disable searching for partial matches
- rep:
- "replace title" - if a partial match was found and no <text to display> was given, display the complete title
To help you (and me) debugging problems with TitleLink there are some commands available:
- {ln:enable:false}
- To disable TitleLink in an article, use the command somewhere inside that article.
- {ln:debug:<phrase and other options>}
- Lets TitleLink show some debug information, if no link could be built.
- {ln:<phrase>}
create simple hyperlink with "phrase" as displayed text - {ln:nw:<phrase>}
create the hyperlink, but with the attribute target="_blank" to open it in a new window - {ln:<phrase> '<title>}
like 1., but use "title" as displayed text. - {ln:nw:<phrase> '<title>}
like 3., but open the link in a new window - {ln:search:<phrase>}
create a link which leads to the site-internal search results for <phrase> - {ln:google:<phrase> '<title>}
create a link which leads to the google search for<phrase> - {ln:http://www.eff.org 'Electronic Frontier Foundation}
creates and external link to the electronic frontier foundation - {ln:op:<phrase>}<img src="image.gif"/></a>
create a hyperlinked image ("op" for "open", because it won't close "</a>" tag) - {ln:<phrase> '<img src="image.jpg" /> ''<tooltip text>}
create a hyperlinked image, linked to <phrase>, and with <tooltip text> as tooltip - {ln:css-mainlevel:<phrase>}
create simple hyperlink with "phrase" as displayed text and "mainlevel" as css class - {ln:search-icq:1234567}
http://wwp.icq.com/1234567 (show site for the ICQ number 1234567) - {ln:search-sourceforge:projects/dotplot/}
http://sourceforge.net/projects/dotplot/ - {ln:limitstart-2:<phrase>}
like example 1., but goes to article page 2.
Tobias Gesellchen (tobias@gesellix.de) is the main programmer. Marc Perkel (marc@perkel.com) is the documentation guy. We welcome your ideas and feedback on the program. Please use the Tracker for feature suggestions or to submit bug reports.
The TitleLink content plugin is released under the GPL License.
(from http://tavi.sourceforge.net/InterWiki)