I'm new to theming in Views, but I get the basic idea of working with templates. However, I want to make a small change to the views_handler_field.inc file without hacking Views. All I want to do is add an additional css class in order to open a read more link in a colorbox. This refers to the read more link you find at "Trim this field to a maximum length" under "Rewrite results" in the field settings. I'm looking to add a class of "colorbox-node" to ln 1179 of views_handler_field.inc:

$more_link = l($more_link_text, $more_link_path, array('attributes' => array('class' => array('views-more-link'))));

should be

$more_link = l($more_link_text, $more_link_path, array('attributes' => array('class' => array('views-more-link colorbox-node'))));

What is the best way to do this? Is there some similar process for overriding handler files as there is for theme templates?

My requirements here are that this apply to only one View, which is why I want to think of this as a theming question. Also, the link should only appear when the output is trimmed. Any help on this is welcome. Obviously a small issue, but I'm stumped.

Comments

drett created an issue. See original summary.

drett’s picture

Issue summary: View changes
MustangGB’s picture

Status: Active » Closed (outdated)

Closing this as outdated to tidy up a bit around here. If you're still having problems with the latest release please create a new issue.