I am trying to create a view to generate JSON Data. Therefore I am using the "Views Datasource" module. All in all the view is a list of files (File Entities) and actually look like this:


But what I really want to have is a list of nodes, including the web url to a thumbnail and another to a bigger version like that:

node: {
    "filename": "xxxx.jpg",
    "url-thmb": "http://.../xxxx.jpg",
    "url-full": "media/.../xxxx.jpg"

In this Situation it does not matter if the path to the file is absolute or not and the name of the keys in the json object, either.

Right now the Settings of the view are:

Display: Files, Format: JSON Data document - simple Fields:

#1: File: Name

#2: File: Rendered

#3: File: Path

Thanks ahead for any Help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.