There're too much logic code in theme function, i think it's better to move them into template_preprocess_select_as_links() so that it's more easy to custom or modify the output.

For example, i want to add attributes rel="nofollow" to the links, currently i have to copy the whole function to THEME__select_as_links() in my cutom template.php and change only this row:

$elem['#children'] = l($value, bef_replace_query_string_arg($name, $key, $multiple), array('attributes' => array('rel' => 'nofollow')));

maybe the codes in search_api_sorts.theme.inc (module search_api_sorts) is a good reference.

Just a suggestion, thanks.

Comments

markhalliwell’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
Related issues: +#1249548: Simplify theme functions by moving code into preprocess functions