Closed (won't fix)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2006 at 12:49 UTC
Updated:
29 Jul 2014 at 17:30 UTC
Introduce a theme function to theme read_more links. read more HTML in Drupal is a mess currently, sometimes you find 20 different formats and combinations of LIs, divs spans [Read More], read more..., Read more » and all sorts of variations on these. Lets centralise this.
This function comes from helpers module. Dunny where it should live in core, though.
/**
* Function to theme the read more links
* @ingroup themeable
* @param $path a drupal path or full url to the full resource. Include http:// if you link to external resource.
* @param $title an optional title that will provide a tooltip text when hovering over the link.
*/
function theme_read_more($path, $title = NULL) {
if ($title) {
$params['title'] = check_plain($title);
}
$params['class'] = 'read-more';
return l(t('read more'), $path, $params);
}
Comments
Comment #1
magico commented+1
Comment #2
nancydruIs any one considering this?
Comment #3
jody lynnComment #4
alan d. commentedCore already has this, theme_more_link(). I'm not sure how many are left to alter, in Drupal 7.x, the node read more link is hard coded in a t().
Related: #1136680: #type 'more_link' - previously theme_more_link() - should have more context
Comment #5
mgiffordJust wanting to close this issue.
There's already a generalized link:
http://api.drupal.org/api/drupal/core!includes!theme.inc/function/theme_...
The example in the node I think is going to be an exception to the rule:
Feel free to re-open.