Hi,

In views, I have selected "output this field as link" and in link path, I wrote "node/[nid]". Link works and open in same window. How to open the link in a new window? I dont see any option in view.

Thanks,
D

Comments

VM’s picture

perhaps rewriting the output adding the HTML with the target="new" ste

webdev100’s picture

In "Output this field as a link" > link path field > node/[nid]

In "Rewrite the output of this field" > text field > I entered:

<a href="node/[nid]" target="_new">[field_image1]</a>

It did not work. I am not sure how would I enter the target = "_new" in the text field.

Thanks.

Drupalima’s picture

Replace the "_new" with "_blank". [field_image1]

XandieL’s picture

the only solution i can think of is assigning it to a specific class e.g. popup

and create a js for it, because a new window behavior depends on the browser

I like the universe, but she messes with my words
I'm not talking planets or galaxies and the distance just makes it worse.
I know what you're thinking, this probably sounds rehearsed.

abbes’s picture

in "rewrite result" at the bottom , you find target , write "_blank" in the field, the link will open in new window

tryitonce’s picture

..... this will only show up after your tick
"Output this field as a link" under the "Text" input field.

geneatwell’s picture

In Drupal 8.8.4, there's a box to tick in the Configure field page for the content entitled "Open link in new window"

Bhanu951’s picture

can you please elaborate ?

maybe a screenshot please.