| Add Article Title to the Read More Link |
|
|
|
|
This tutorial will guide you through the steps used to add the Article title to the Read More... link that is displayed in the Joomla! Front Page, Category and Section Blog Layout. You will need to be able to access the file system which houses your Joomla! web site in order to complete this tutorial. First you need to locate your template directory and files. This is located in the templates directory of your Joomla! web site installation, navigate to the templates directory, and then into the directory which contains your template files and subdirectories. Locate the html subdirectory within your template directory, or create the html directory if it does not exists.
Now, within the /templates/your template/html/ directory, locate or create a directory named com_content, and within that directory, locate or create three additional directories named category, frontpage, and section. Once you have located or created the required directories and subdirectories for this tutorial, you should have the following three directory paths available:
Next, you need to locate the following 3 files located in the /components/com_content/views/ directory of your Joomla! web site installation. Within the views directory, locate the subdirectories that match those you created in your template directory (category, frontpage, and section). Starting with the category directory, copy the file: /components/com_content/views/tmpl/blog_item.php Next copy the frontpage file: /components/com_content/views/tmpl/default_item.php And finally, copy the section file: /components/com_content/views/tmpl/blog_item.php The last step to add the Article title to the Read more link, is to edit each of the files that you copied into your template directory. Open each of the files you located or created in your Joomla! template directory, and locate the following line of code near the bottom of the file, the line numbers listed are correct for Joomla! version 1.5.14 stock files:
Change the line to look like this:
This will cause your Read more link to display like: Read more... [Your Article Title Here] A brief overview of the sprintf statement above, when the code is executed, the
If you've followed the steps outlined above, you should now have the Article title displayed with the Read more link in your Joomla! website. |