Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Content & Markdown

Making a youtube or other query string link open in new tab

Solved by pamtbaau View solution

Started by John 8 years ago · 2 replies · 1582 views
8 years ago

Hi!

I am trying to link a youtube video in a new tab using markdown.

TXT
[interview](https://www.youtube.com/watch?v=IUS48ElQ3Ek?target=_blank)

However, this link does not open in a new tab. I'm wondering if the parser is only seeing the first '?' in the YouTube link?

Example page: https://daveyoenterprises.com , towards the bottom of page in "press" links section.

Thoughts appreciated.

Thank you.

8 years ago Solution

@jkproperty I have no experience with this, but did have a quick look at the docs for you...

Shouldn't the second question mark be an ampersand? See Attribute Combinations in the Grav docs.

TXT
[interview](https://www.youtube.com/watch?v=IUS48ElQ3Ek&target=_blank)

Or maybe try Pass-through of Non-Supported Attributes

HTML
[Pass-through of 'cat' attribute](../some-page?classes=underline&cat=black)

// <a href="/your/pages/some-page?cat=black" class="underline">Pass-through of 'cat' attribute</a>
last edited 11/09/18 by pamtbaau
8 years ago

Thanks!

The ampersand worked. Thank you for the pointer to the docs. I did look at them for the initial ?, but it's obvious I didn't read further.

Thank you again!

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 8 months ago
6 99 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 186 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 148 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 62 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 257 1 year ago