Making Top Menu Links open in new window in Artisteer blogs
By default in templates created with Artisteer the top menu links open in the same window and we can not use when adding our link the target="_blank" option if we want to open the links in a new window or tab. In the next tutorial I will show you how to modify the code in your template , for allowing the links to open in a new window/tab.
1. Log in to your dashboard--> Design- -> Edit HTML
2. Search "Ctrl+F" and find the following code:
Replace the red line with:
This will make the links in the navbar open in new windows.
3. To make the links in the sub-menus open in new windows follow the next steps.
For the first sub-menu find:
Replace the red line with:
For the second sub-menu find:
Replace the red line with:
For the third sub-menu find:
Replace the red line with:
4. Save the template. Now all the links in the Top Menu will open in new windows.
DEMO
1. Log in to your dashboard--> Design- -> Edit HTML
2. Search "Ctrl+F" and find the following code:
jQuery("ul.art-hmenu").append('<li><a href="'+itemlink+'"><span
class="l"></span><span class="r"></span><span class="t">'+itemname+'</span>
</a></li>');
Replace the red line with:
<a href="'+itemlink+'" target="_blank">
This will make the links in the navbar open in new windows.
3. To make the links in the sub-menus open in new windows follow the next steps.
For the first sub-menu find:
if (subList1.length == 0 ) subList1 = jQuery("<ul></ul>");
subList1.append('<li>
<a href="'+itemlink+'">'+itemname.substr(1,itemname.length)+'</a></li>');
Replace the red line with:
<a href="'+itemlink+'" target="_blank">
For the second sub-menu find:
if (subList2.length == 0 ) subList2 = jQuery("<ul></ul>");
subList2.append('<li>
<a href="'+itemlink+'">'+itemname.substr(2,itemname.length)+'</a></li>');
Replace the red line with:
<a href="'+itemlink+'" target="_blank">
For the third sub-menu find:
if (subList3.length == 0 ) subList3 = jQuery("<ul></ul>");
subList3.append('<li>
<a href="'+itemlink+'">'+itemname.substr(3,itemname.length)+'</a></li>');
Replace the red line with:
<a href="'+itemlink+'" target="_blank">
4. Save the template. Now all the links in the Top Menu will open in new windows.
DEMO
5 comments
You are the best...
Thanks! Now i'll try!
Another very good tutorial.
I think it would be better if we can put seperate in each menus we want the blank open, not in all of them, I mean that we could put the blank open in some menus, there we want because I do not want to put in all menus or submenus...
Thanks very much
Hi,
is possible to generate templates like magazine,with artisteer ?
I mean to have something like this
http://www.newsit.gr/default.php?pname=ArticleList&catid=3
To create only in artisteer that kind of template it's not possible, but with customizing the template code after exporting , add different widgets and sliders it's possible.
I have posted a tutorial about making the post area like in that template, original it shows how to create a photo template but it works also with magazine ones.
Here is the link to the tutorial:
http://www.artistutorials.co.cc/2011/04/how-to-create-image-gallery-template.html
Very good tutorial everyday. Some question with Makedon. can i make exception for some link to not open in new tab?
i won't my browser opening new tab when i click on "home" tab...
Click to Add a New Comment
Leave your comment
- If you're asking a question click the Subscribe By Email link, below the comment form, to be notified of replies.
- Do NOT add links to the body of your comment as they will not be published.
- Only the comments posted in ENGLISH will be approved.
- If you have a problem check first the comments , maybe you will find the solution there.