Drupal views - how to remove a line template with "Rewrite this field's output"?

Views - Fields: I want to remove a specific matching word from the returned string using "Overwrite this field's output". Is there an extended syntax for this or is there a way to use php string-functions / regex on this field?

+2


source to share


2 answers


Don't believe that you can do more than put HTML, text and other fields there. You would probably be better off using something like String Overrides or some good old str_replace in the custom module or preprocess function of the theme.



+2


source


EDIT: Found a really lightweight solution. First install the Views Custom Field module . Then add whatever field you want to change and make sure it doesn't appear on the display. Then add the Customfield: PHP Code field and add whatever processing you want to this. You must have access to the original field in this PHP Code field, so you can process it from there.



Good question and I hope this helps!

+1


source







All Articles