function facetapi_l in Facet API 6
Identical to the l() function, except the "active" class is not automatically set. This is useful for generating links that are displayed on the search page and link back to the search page. If we used l(), all facet links would be "active" since they link back to the page on which they are being displayed.
Parameters
$text: A string containing the text to be enclosed with the anchor tag.
$path: A string containing the Drupal path being linked to. Can be an external or internal URL.
$options: An associative array of additional options.
Return value
A string containing the anchor link.
See also
l()
3 calls to facetapi_l()
- theme_facetapi_link in ./
facetapi.theme.inc - Themes a facet link for a value that is currently being searched.
- theme_facetapi_link_active in ./
facetapi.theme.inc - Themes a facet link for a value that is currently being searched.
- theme_facetapi_link_inactive in ./
facetapi.theme.inc - Themes a facet link with an optional count.
File
- ./
facetapi.module, line 252 - An abstracted facet API that can be used by various search backens.
Code
function facetapi_l($text, $path, array $options = array()) {
global $language;
$options += array(
'attributes' => array(),
'html' => FALSE,
);
if (isset($options['attributes']['title']) && FALSE !== strpos($options['attributes']['title'], '<')) {
$options['attributes']['title'] = strip_tags($options['attributes']['title']);
}
return sprintf('<a href="%s"%s>%s</a>', check_url(url($path, $options)), drupal_attributes($options['attributes']), $options['html'] ? $text : check_plain($text));
}