Views - Fields: I want to remove a certain matching word from a returned string by using the "Rewrite the output of this field". Is there extended syntax for this or is there a way to use php string-functions/regex in this field?
views:
1113answers:
2
+1
A:
Don't believe you can do anything more than put in HTML, text, and other fields in there. You'd probably be better off using something like the String Overrides module or some good old str_replace in a custom module or theme preprocess function.
Mike Crittenden
2009-10-27 12:56:51
just found this module drupal.org/project/views_customfield allowing calling php in views. i'll try this first. .. let's see
Bernd Plontsch
2009-10-27 14:52:31
+1
A:
EDIT: Found a really easy solution. First, install the Views Custom Field module. Then add whatever field you want to modify to your view, and check to exclude from display. Then, add a Customfield: PHP Code field after that and add whatever processing you want to that. You should have access to the original field in that PHP Code field, so you'll be able to process it from there.
Good question, and I hope this helps!
theunraveler
2009-10-27 14:09:12