Closed (duplicate)
Project:
Services Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2013 at 02:34 UTC
Updated:
14 Nov 2019 at 15:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pau1_m commentedYou could use Image URL Formatter module to output just the url of an image, otherwise you'll have to use services_raw output or write your own result in PHP with PHP Views module. There's also Custom Formatters module might help (I haven't tried it though).
Comment #2
dereckd commentedThanks, thy both seem like great modules, but nothing seems to effect the output of the view. I'm thoroughly confused, it seems no matter what I do in the view, the services output is not formatted like I want it.
Comment #3
frankyn commentedI added the strip_tags functionality to services_views with the following patch.
Comment #4
ygerasimov commentedYou can also use hook_services_views_execute_view_alter() to alter your results.
Comment #5
dereckd commentedThis is great, however in my case I just need the src, which is inside the image tag, is there any possible workaround for that? Also, I'm just a little confused, where does the information from the database (the image src) get decorated with all of the HTML. Since this is a service view, would it make sense display the raw url directly?
Comment #7
manicato commentedSame problem than #5. The patch doesn't fix the issue
Comment #8
dippers commented@manicato look at the field formatters suggested in #1922620: How do I alter field output before it goes to the service.
Comment #9
tripper54 commentedI have re-rolled #3 for latest dev. I know it doesn't address the OP's issue, but it fixes a bug of the UI not working as expected.
For rendering images as URLs instead of img tags, I use https://www.drupal.org/project/image_url_formatter with great success, for services views and elsewhere.
Comment #10
tripper54 commented...and here is the patch correctly named ;)
Comment #11
visabhishek commentedHi,
Patch looks good to me, and working fine to remove HTML from certain fields.
Thanks @tripper54 for this patch.
Comment #12
thedut commented#10 works for me, thanks
Comment #13
generalredneckLooks like this was already committed in #1917032: Search API with Services Views