Доброго времени суток.
Фасеты выводятся так:
<a href="/catalog/sklad/bochkokantovateli-i-oprokidyvayushchie-ustroystva?f[0]=field_gruzdiapazon%3A390" rel="nofollow" class="facetapi-checkbox facetapi-inactive facetapi-makeCheckbox-processed facetapi-disableClick-processed" id="facetapi-link">0-500 кг (3)<span class="element-invisible"> Apply 0-500 кг filter </span></a>
А надо вот так:
<span class="hidelink facetapi-checkbox facetapi-inactive" data-link="<a href="/varochnye-paneli?f[0]=field_cook_top_reshotki%3A%D1%87%D1%83%D0%B3%D1%83%D0%BD" rel="nofollow" class="facetapi-checkbox facetapi-inactive" id="facetapi-link--43">чугун (101)<span class="element-invisible"> Apply чугун filter </span></a>">чугун (101)</span>
Я уже всё перерыл и не могу понять как это реализовать. Подскажите о всезнающее сообщество!
Заранее спасибо!
Комментарии
патч для фасет апи widget_link.inc
index 0ae49b3..6012a99 100644
--- a/widget_links.inc
+++ b/widget_links.inc
@@ -143,6 +143,8 @@ class FacetapiWidgetLinks extends FacetapiWidget {
// Themes the link, adds row to items.
$row['data'] = theme($item['#theme'], $variables);
+ $class = implode(' ', $variables['options']['attributes']['class']);
+ $row['data'] = '<span class="hidelink '. $class .'" data-link="'.htmlspecialchars($row['data']).'">'. $variables['text'] . ' (' . $variables['count'] .')</span>';
$items[] = $row;
}
css для отображения чекбоксов:
color: #666666 !important;
padding-left: 17px !important;
background: rgba(0, 0, 0, 0) url("../images/checkbox.png") no-repeat scroll 0 -1px !important;
cursor: pointer;
font-size: 11px !important;
margin-right: 0 !important;
}
.facetapi-inactive:hover{
background: rgba(0, 0, 0, 0) url("../images/checkbox.png") no-repeat scroll 0 -52px !important;
color: black !important;
}
.facetapi-active{
color: black !important;
padding-left: 17px !important;
background: rgba(0, 0, 0, 0) url("../images/checkbox.png") no-repeat scroll 0 -27px !important;
cursor: pointer;
font-size: 11px !important;
margin-right: 0 !important;
}
сама картинка: