A useful feature for Joomla would be a way to store a URL for an article that only links to another site. You would have to manually create the link within a Joomla article which involves quite a bit of steps to do. I would rather create the title, add the URL, write a brief description of the site, and post the article to my web site.
I was looking at creating a custom component to do this, but while looking at the jos_content table, which contains the articles in Joomla, I noticed a urls field. None of my sites used that field, so this would be a good candidate to hold an articleâ€™s URL. The URL text box will look the following:
If you enter a URL here, it will be saved and can be used to build a link to the page content.
How To Add a urls Field
Adding a urls field to a Joomla article is not an easy task for a novice webmaster. A good free tool for editing PHP content is Eclipse. Start your editor, and do the following procedure:
- Open admin.content.html.php in the administrator/components/com_content/ folder.
- Find the _displayArticleDetails function.
- Add the following code at the end of the function before the </table> tag:
<td valign="top" align="right">
<input class="text_area" type="text" name="urls" id="urls" size="40" maxlength="254" value="<?php echo $row->urls; ?>" />
A URL field will now be displayed when you are editing an article. Anything you enter here will be saved in your Joomla database. Part 2 will show you how to use the URL that was saved with the article.