[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Change the read more... link in joomla 1.7

Posted on 2011-10-21
3
Medium Priority
?
690 Views
Last Modified: 2012-05-12
Exsperts,

I wonder if anyone knows how to change the Read more.. link GLOBALLY in joomla 1.7.

My clients want a specific link, but thay wont want to go in and change the article settings every time. There doesnt appear to ber a global option for this text.


Any suggestions?

Regards
Easynow
0
Comment
Question by:Dean OBrien
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
Jesse Matlock earned 2000 total points
ID: 37010646
For this you can use the overrides... this will allow you to change the text and even the formatting of the readmore links.. if you just wish to change the text of the readmore link, see further below...

If it's not already there, in your template folder: create a new folder called 'html'.
In that folder you create a folder called 'com_content'.
And in that folder you create the folders called "category", "frontpage" and "section"

Then locate the following files

    (joomla)/components/com_content/views/category/tmpl/blog_item.php
    (joomla)/components/com_content/views/frontpage/tmpl/default_item.php
    (joomla)/components/com_content/views/section/tmpl/blog_item.php


Copy the files to your template's html folders

    (yourtemplate)/html/com_content/category/blog_item.php
    (yourtemplate)/html/com_content/frontpage/default_item.php
    (yourtemplate)/html/com_content/section/blog_item.php


Open these files.
Nearly at the bottom of these files you should be seeing something like:
		<p class="readmore">
				<a href="<?php echo $link; ?>">
					<?php if (!$params->get('access-view')) :
						echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
					elseif ($readmore = $this->item->alternative_readmore) :
						echo $readmore;
						if ($params->get('show_readmore_title', 0) != 0) :
						    echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
						endif;
					elseif ($params->get('show_readmore_title', 0) == 0) :
						echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE');
					else :
						echo JText::_('COM_CONTENT_READ_MORE');
						echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
					endif; ?></a>
		</p>

Open in new window

you can change the content of the readmore there, depending on how you'd like to change it..
try changing
echo JText::_('COM_CONTENT_READ_MORE');

Open in new window

to:
echo JText::_('Learn more...');

Open in new window

or whatever text you prefer.


IF YOU ONLY WANT TO CHANGE THE TEXT OF THE READMORE LINKS, and not the formatting, etc.. open your language file (root/language/en-GB/en-GB.com_content.ini) and replace the values for:

COM_CONTENT_READ_MORE="Read more: "
COM_CONTENT_READ_MORE_TITLE="Read more..."
COM_CONTENT_REGISTER_TO_READ_MORE="Register to read more..."

0
 
LVL 12

Author Closing Comment

by:Dean OBrien
ID: 37018172
Worked a treat thanks.
Easynow
0
 
LVL 8

Expert Comment

by:Jesse Matlock
ID: 37019991
Anytime.. !
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Knowledge base software has turned out to be a quite reliable method for storing information, promoting collaborative work and for sharing valuable input and solutions.However, some organizations are trying to develop a knowledge base that works wit…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question