<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You can create a
views-exposed-form--[view_id].tpl.php file for that view. Replace
the text box with the HTML of your choice.<br>
<br>
Another possibility is to use taxonomy reference or list-type
field, but you would have to write a hook_form_alter and
associated functions to set the value of that field in a custom
module. This would give you the radio buttons in the views filter
with BEF.<br>
<br>
Actually, scratch all that. Here's the best option: update to the
very latest Views, and then you can specify "Grouped filters".
This lets you predefine regexes for the original text field
exposed filter:<br>
<br>
Label: A-F, Operator: Regex, Value: ^[A-Fa-f]<br>
Label: G-L, etc....<br>
<br>
If you drop your computed field, this will make the query run a
little slower (though you may not notice if it is not a lot of
data). If instead you run this on the computed field, you can use
the equals operator which will run faster (especially if you add
an index to the table for your computed field).<br>
<br>
Ted<br>
<br>
On 8/22/2012 12:03 PM, toon severijns wrote:<br>
</div>
<blockquote
cite="mid:CADEESM=yXhXXetx_O74Aax+-Ff2X7o2dPU0WN9sPS66oWHMqTw@mail.gmail.com"
type="cite">Thanks a lot Ted!<br>
<br>
I've followed your advise and i've got the computed field to work.
I can't seem to bring out the computed field as radio buttons with
better exposed filters though as it's a text field. Maybe facets
could be a solution.<br>
<br>
Best,<br>
<br>
<br>
Toon<br>
<br>
<div class="gmail_quote">On Tue, Aug 21, 2012 at 9:35 PM, Ted <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:ted-drupalists@webfirst.com" target="_blank">ted-drupalists@webfirst.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div><br>
It might be easiest to use computed_field to store the
appropriate range value on the node. Then override the
views-exposed-form.tpl.php if you need the buttons to
really be buttons. You could always get fancy with JS and
CSS using radio buttons and better_exposed_filters
auto-submit. Facets would work, but you would still need
to use computed_field, I think Facet API only supports
ranges for numeric and date fields.<span><font
color="#888888"><br>
<br>
Ted</font></span>
<div>
<div><br>
<br>
On 8/21/2012 12:29 PM, toon severijns wrote:<br>
</div>
</div>
</div>
<div>
<div>
<blockquote type="cite">Hello,<br>
<br>
Could anybody help me with some advise on how to
create a views filter (D7) containing buttons with
alphabetical ranges (like "A-F", "G-L", "M-R", "S-Z",
"All") filtering on the first letter of the nodes'
title field?<br>
I've seen a post on how to create an alphabetical
index (<a moz-do-not-send="true"
href="http://drupal.org/node/641342" target="_blank">http://drupal.org/node/641342</a>)
but i kind of need the letters grouped in ranges. Or
is this something that's best done with search
API/facets?<br>
<br>
Any help would be greatly appreciated!<br>
<br>
Best,<br>
<br>
<br>
Toon<br>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</body>
</html>