6

I would like to output plain absolute URL of the node from Views as part of my XML feed (via Views Datasource).

So far I have found the following field handler:

Content: Link - Provide a simple link to the content.

which is provided by Views it-self, but checking views_handler_field_node_link.inc file doesn't seems to support displaying plain text (and there are no any field formatters, as it's field specific), but instead I've got:

<a href="http://localhost/node/123">view</a>

without possibility to change the format (apart of the text it-self).

Is there any other way to display just plain URL of the node using Views field handler (without having actual field)?

  • 1
    is it an option to use Global :Text field and construct URL manually - http:// localhost/node/[content:nid] ? Haven't used Views Datasource, so I'm not sure if this approach will work with its formatting requirements. – oksana-c Jan 15 '16 at 22:34
7
+50

Content: Path works with Drupal 7. Select Use absolute link (begins with "http://") in Rewrite results section of the field settings.

screenshot

3

Instead of Content: Link, use the Content: Path field.

  • AFIK, That will work for D8 not for D7. – itsdarrylnorris Jan 18 '16 at 2:17
  • 2
    Content: Path works with D7 – nikunj Jan 18 '16 at 6:15

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.