开发者

Remove readmore article title from joomla

How can I remove the article title from the readmore link in Joomla?

I don't have sh404SEF.

<?php if ($this->item->readmore_register) :
    开发者_如何学Python    echo JText::_('Register to read more...');
    elseif ($readmore = $this->item->params->get('readmore')) :
        echo $readmore;
    else :
        echo JText::sprintf('Read more', $this->escape($this->item->title));

    endif; ?>

Change this rule:

echo JText::sprintf('Read more', $this->escape($this->item->title));

To:

echo 'Read More';

Is also not corrent because it's not multilangual.

Anyone knows the solution?


You can configure it within your post-options. There you can specify if you want to show the button at all, and if so, if the title should be displayed on it.

You can configure that in the post itself or in the global options for a whole category or all posts. Unfortunately I don't know the english terms for this two options, since I use the german translation.

=== EDIT ===

Okay, I just rechecked it. You add a new menu-item and select for example "Category Blog" as Menu Item Type. Then on the right side you open the "Article Options"-Panel. There you'll find the two options 'Show "Read More"' and 'Show Title with Read More'. Choose "Hide" with the latter one. This way your button/link will only contain the text "Read More" (or which language you have selected) and not the title ;)

If you want to generally set this up. There is another way to make this behaviour default. Go to your Content-Administration and select "Options" in the toolbar. Select the tab "Articles" (it's the first). There you'll see the two options I already mentioned.


I got it!

change

echo JText::sprintf('Read more', $this->escape($this->item->title));  

to

echo JText::_('READ MORE');  

And you can change the text in language/nl-NL.com_content.ini and the other languages too
just search for read more

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜