How to Link to an Article in Joomla!

jce_logoFor some reason, linking to an article in Joomla! seems like something that should be obvious but surprisingly it is not. I have been approached quite a number of times to help people link their Custom HTML modules to an article in Joomla! and normally the trouble comes in when for whatever reason, the article to be linked does not have a menu item on the front end of the site, so one cannot go and copy the article link. I did some research, trying to find easy ways of doing this said linking, and I have come up with some two solutions, which I think should work for anybody in this predicament. So, here we go.

Use JCE Editor instead of TinyMCE

Joomla Content Editor, or JCE, is an alternative editor to the default editors that come with an ordinary Joomla! installation. This editor features all the goodies of TinyMCE and adds an advanced Link Insertion Tool that allows for easy linking to Joomla! content. This is what the JCE Advanced Link plug-in looks like.

link-editor

 

As you can see, this link plugin makes it possible to link text in the article or module or whichever extension is using the editor, to Joomla! content, contacts, menu items and even web links saved in the system. That ideally easily solves the problem of linking text to internal Joomla! articles, or resources.

To install the JCE editor, go to the JCE downloads page and download a copy of the editor, and then use the Extension Manager (Joomla! 1.6, 1.7, 2.5) or Install/Uninstall (Joomla! 1.5) tool in Joomla! to install the editor. You then need to go to your Global Configuration Page and change the default editor to JCE. If you do not find the option for the JCE editor in the Global Configurations, go to your Plugins Manager and ensure that the newly installed editor is enabled.

Manual Linking to Articles

This is a more direct method of linking and leverages knowledge of how Joomla! works. You may use this method on any WYSIWYG editor.

Step 1: Go to your article manager and find the article you want to link to.

Step 2: Note the ID of this article – This is normally the number of the last (right-most) column of the article you want to link to.

Step 3: Go to the edit page of where you want to insert the link of the article.

Step 4: Select the text to be linked to the article and click on the ‘link to’ button in the editor

Step 5: In the popup form, put the following text in the ‘link’ field

index.php?option=com_content&view=article&id=<id>

Replace <id> with the ID number that you noted in Step 2

Step 6: Input other parameters of the link and insert it

And that is it. You will have manually linked to your desired Joomla! article. Clicking on the link created will take you to the linked article.

And people, there you have it. Now you should be able to link to Joomla! articles easily. Should you have any questions, please feel free to comment. Now, back to code!

Share

5 comments

  1. Oh! It was going error because I’ve linked id withing smaller and greater brackets. Removing this works. Thank you very much.

  2. you are welcome and congratulations on being able to figure it out yourself. Kudos to you! Though should you have more questions, please do not hesitate to ask…

Leave a Reply