0

I am creating a block in view. I have a content type with a field(plain text). I am passing contexual filter "content id" from url.

I am giving value in the fields as "www.facebook.com/SomePage" Now i want that to be created as link text from custom text in views.

In custom text i am providing

    <a href="{{ field_abc }}" target="_blank">Click Here</a>

Now when i click here it is redirecting me to "[sitename]/node/www.facebook.com/SomePage"

I want to open like www.facebook.com/SomePage.

How to do. Any suggestion?

1

I'd rather add a 'Custom text' field to the view, give it some text ("Click here"), and under "Rewrite Results" check "Output this field as a custom link", link path is {{ field_abc }} and then check "External server URL"

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.