Zen Cart Logo
Forums / Contribution-Writing Guidelines / Open in new window Admin Delete Categories Link &target="_blank" ? zen_href_link(

Open in new window Admin Delete Categories Link &target="_blank" ? zen_href_link(

Views: 3,420

Results 1 to 2 of 2
16 Apr 2017, 4:48 AM
#1
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Open in new window Admin Delete Categories Link &target="_blank" ? zen_href_link(

So occasionally I blow up my easypopulate.php import and create a bunch of bogus categories by accident that I delete out so I want to have my delete icon open in a new window. I was trying to simply add the &target="_blank" to the link as seen below, but it only loads as &target=

any idea why? I can't seem to escape? the double quote maybe? I tried slashes, concatenating, etc. I think I'm just too much of a n00b.

admin/includes/modules/category_product_listing.php

<?php echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories->fields['categories_id'] . '&action=delete_category') . '&target="_blank">' . zen_image(DIR_WS_IMAGES . 'icon_delete.gif', ICON_DELETE) . '</a>'; ?>
16 Apr 2017, 8:36 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Open in new window Admin Delete Categories Link &target="_blank" ? zen_href_link(

Two things that come to mind:

First the use of the target parameter on an a link is not "anded" to anything, it is its own parameter, so it would not be '&target=""' but instead a space then target:

. ' target="_blank"'. 

The other thing which really in the realm of security should have been first is that you shouldn't have two admin windows open at the same time... creating such a button/link does that...

Been a while since I've looked up where it says that, but thought it was in the either some of the design criteria or standard usage or something.