I set up width and height categories as computed fields and I am now trying to set up the results as exposed filters.

(Currently I only get a text field as a filter. Please see http://ace.pinxi.net/capabilities/framing/mouldings)

Suggestions?

PS. here's my code to get the filter values:

$height_integer = $node->field_moulding_height_integer[0]['value'];
$height_fraction = $node->field_moulding_height_fraction[0]['value'];

list($height_top, $height_bottom) = split('[/]', $height_fraction);

$height_whole = $height_integer + $height_top/$height_bottom;

if ($height_whole > 2) {
    $node_field[0]['value'] ='&lt 2';
} elseif ($height_whole  >= 1) {
    $node_field[0]['value'] ='&gt 1 &le 2';
} elseif ($height_whole  >= 0.5) {
    $node_field[0]['value'] ='&gt 0.5 &le 1';
} else {
    $node_field[0]['value'] ='&gt 0.5';
}

I am trying to get a dropdown array with these values.

Comments

pinxi’s picture

Status: Active » Closed (fixed)
sunnyjiap3’s picture

Hi, have you found a solution for this?

asak’s picture

Same issue.

Subscribing.