External Links - New Window . Dawn Theme

Topic summary

A user needs help making a PDF catalog link in their Shopify Dawn theme header open in a new window/tab. They cannot locate where to add the target="_blank" attribute in the code.

Proposed Solutions:

  • Liquid modification: Edit the header.liquid file and add the blank attribute to the <a> tag within the navigation loop. Use a conditional statement (e.g., if forloop.index == 2) to target the specific menu item position.

  • JavaScript approach: Use JavaScript to select the catalog menu link specifically and programmatically add the target="_blank" attribute.

The discussion remains open with no confirmation of which solution was implemented or whether the issue was resolved.

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hello,

I have a PDF file within Shopify that is linked in my header as “Catalog”.

I want this link to open in a new window. However, I can’t find the link code anywhere in the code to add the “blank” script.

Theme is Dawn.

Any help is appreciated!

You will have to modify code inside header.liquid file. inside the for loop when the second instance is running you can add the blank attribute inside the tag. the statement is like this.

if forloop.index == 2 ofcourse in liquid syntax. Or you can select the specific a tag of the catalog menu item with js and add the blank attribute