Links and new window

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Links and new window

Post by jmestep » Mon Jul 13, 2009 7:04 am

Could someone check this out before I submit a bug report?
On 7.0.2 and 7.0.3, add a link to an external site using the Add link function.
Set it to use direct link and select new window (_blank) from the dropdown.
The page doesn't open in a new window it replaces the page in the site.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Links and new window

Post by mazhar » Mon Jul 13, 2009 7:25 am

Yes there seems to be some problem. I have checked this with 7.0.3 on Category Page with data. Going to report it for 7.0.3.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Links and new window

Post by mazhar » Mon Jul 13, 2009 7:28 am

Issue logged, you can track progress here
http://bugs.ablecommerce.com/show_bug.cgi?id=8220

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Links and new window

Post by jmestep » Mon Jul 13, 2009 10:12 am

Is it something you can post a patch of code for? We've got a client ready to go live and I'll have to try something if you can't!
Thanks
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Links and new window

Post by mazhar » Mon Jul 13, 2009 10:26 am

In categorygridpage4 locate following code

Code: Select all

//OUTPUT LINKED NAME
                itemTemplate1.Controls.Add(new LiteralControl(string.Format("<a href=\"{0}\" class=\"highlight\" target=\"{1}\">{2}</a><br />", catalogNodeUrl,target ,catalogNode.Name)));
and update it as

Code: Select all

string target = string.Empty;

if (catalogNode.CatalogNodeType == CatalogNodeType.Link)
target = ((Link)catalogNode.ChildObject).TargetWindow;
//OUTPUT LINKED NAME
                itemTemplate1.Controls.Add(new LiteralControl(string.Format("<a href=\"{0}\" class=\"highlight\" target=\"{1}\">{2}</a><br />", catalogNodeUrl,target ,catalogNode.Name)));

Post Reply