Hi, a Normal Menu link
url: "CRs/KPIs/BrandKPI/report.aspx",
i need to open the link in new tab, not to open in same window.
thank you for your support in advance
6 Answer(s)
-
0
Hi,
You can add target="_blank" to the menu item (<a class="postlink" href="http://www.w3schools.com/tags/att_a_target.asp">http://www.w3schools.com/tags/att_a_target.asp</a>). To do that;
In the menu rendering code (depends on which version you're using. for example for angularjs, it's here: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/App/common/views/layout/sidebar.cshtml">https://github.com/aspnetzero/aspnet-ze ... bar.cshtml</a>) just add target attribute conditionally.
If you want to generalize it, you can add a CustomData while defining a menu item. Then you can check this custom data in the menu rendering code.
I think this would be a general requirement and added a Github issue to add it as a standard property: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1737">https://github.com/aspnetboilerplate/as ... ssues/1737</a>
-
0
Hi, i was not sucessful in implementing this, it gives error.
can you please help me see the correct script using this example?
url: "CRs/KPIs/BrandKPI/report.aspx",
<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/App/common/views/layout/sidebar.cshtml">https://github.com/aspnetzero/aspnet-ze ... bar.cshtml</a>
this link is not functional.
-
0
Hi Fahd,
Can you share your github username with us ? We will invite you to private repository, then you will be able to see that link.
Thanks.
-
0
fahdneo
thanks
-
0
You are invited. Now you should be able to see that link after accepting the invitation.
-
0
done
thank you for the world class support.