cancel
Showing results for 
Search instead for 
Did you mean: 

Making navigation bar open links in new tab through categories

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Making navigation bar open links in new tab through categories

So I have a navigation bar that is built through the categories, and I want one of those categories and its subcategories to open in new tabs if someone clicks on them. How do I go about doing this?

 

I know to open a hrefs in new tabs it is target="_blank" but a) I don't know where to put this in this case and b) I was hoping there was a way to do it straight from the categories for this one particular thing

 

Thanks in advance for any help

2 REPLIES 2

Re: Making navigation bar open links in new tab through categories

Hi @letssewllc,



Unfortunately, it's not possible to set the target from the category configuration.

 

I suggest you to add a new category attribute, and then add that attribute to the category configuration form.

 

Then, you can add the IF statement to add the target="_blank" in the menu output if the category attribute is set for the category to be opened in a new tab.

 

 

Best regards.
Gabriel

Welcome to the Magento Forums. Remember to introduce yourself and read the Magento Forums Guidelines.

Re: Making navigation bar open links in new tab through categories

@Gabriel Guarino

 

What do you mean by category attribute? Can't I just specify the category ID numbers?

 

And from there where would I find the files I would need to edit in the Magento Base? Obviously I won't edit the base magento codes but if I know where to look that will help a lot.