Closed (fixed)
Project:
Computed Field
Version:
master
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2007 at 23:07 UTC
Updated:
17 Oct 2008 at 20:38 UTC
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'] ='< 2';
} elseif ($height_whole >= 1) {
$node_field[0]['value'] ='> 1 &le 2';
} elseif ($height_whole >= 0.5) {
$node_field[0]['value'] ='> 0.5 &le 1';
} else {
$node_field[0]['value'] ='> 0.5';
}I am trying to get a dropdown array with these values.
Comments
Comment #1
pinxi commentedComment #2
sunnyjiap3 commentedHi, have you found a solution for this?
Comment #3
asak commentedSame issue.
Subscribing.