I try to write a cookies policy page in my site, and it does some curious. While with the other links to Firefox cookies policy page or Internet Explorer, open with **?target=_blank in a blank tab, with Google policy page doesn’t happen the same.
I’ve write this:
With this link, the page open in the current tab instead the new one.
For example, with the link to Mozilla Support works fine:
You can see it in grav.juanvillen.es
Thanks for your help.
@pmoreno The link to Google is malformed.
It should be:
<a href="https://support.google.com/chrome/answer/95647?hl=es&ref_topic=3421433%3F" target="_blank">
Thanks pamtbaau. It’s a pleasure to have your help again
Thanks. Your link is correct too.
Would you mind explaining why a link like
should work? I haven’t found any reference to this.
Writing it in the html link won’t work, but Grav picks up the attribute in markdown links:
Ah, your answer refers to creating a link with the target attribute in Markdown…
[Link in new Tab](../some-page?target=_blank)
That wasn’t clear to me…
This link doesn’t work in markdown format. I think that is so because the link has two ‘?’ character, but I’m not sure.
However, if I write the link like you say above, using the
<a> tag, it works fine.
@pmoreno Note the syntax of query strings:
- There can only be one
? in the url. It separates the path from the query string.
- Separate the second, third, and any subsequent parameters with
Not working due to incorrect querystring:
Markdown : [My link](/path/to/page?param1=value1?target=_blank)
Generates: <a href="/path/to/page?param1=value1%3Ftarget%3D_blank">My link</a>
Markdown : [My link](/path/to/page?param1=value1&target=_blank)
Generates: <a href="/path/to/page?param1=value1" target="_blank">My link</a>
Kind request to edit and improve your question for clarity:
- The question would be more clear if you explicitly showed the context of the urls shown: Show the entire markdown, or <a> you used.
- And while you’re at it, a better title could be “Markdown link not showing in new tab”
@pamtbaau, thaks again. At first of all, I’d like to inlcude the complete markdown code about the link to google page, referred in this post:
<a> tag (works fine):
<a href="https://support.google.com/chrome/answer/95647?hl=es&ref_topic=3421433%3F" target="_blank"> soporte de Google</a> o la Ayuda del navegador.
Code with your last solution (works fine, but it’s more clear):
[soporte de Google](https://support.google.com/chrome/answer/95647?hl=es&ref_topic=3421433%3F&target=_blank)
Finally, you’re right when you say that the title of post isn’t very clear, but I can’t to change it now. If you want and you can change it, do it, no problem.
Thanks for all.
your link is working thank you