How can I use "open a File in new window" in drupal 7?
Add target="_blank" to the link.
target="_blank"
Example: <a href="/sites/default/files/file_name.pdf" target="_blank">File</a>.
<a href="/sites/default/files/file_name.pdf" target="_blank">File</a>
See the HTML Anchor Element page on the Mozilla Developer Network for more details.
just confused when display an image and set 'Link image to' file, how can I add 'target="_blank"'?
hack theme is not a good way, there should be a good way to end users for UX.
Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.
Comments
Comment #1
Devin Carlson CreditAttribution: Devin Carlson commentedAdd
target="_blank"
to the link.Example:
<a href="/sites/default/files/file_name.pdf" target="_blank">File</a>
.See the HTML Anchor Element page on the Mozilla Developer Network for more details.
Comment #2
rogical CreditAttribution: rogical commentedjust confused when display an image and set 'Link image to' file, how can I add 'target="_blank"'?
hack theme is not a good way, there should be a good way to end users for UX.