私はあなたがjavascriptからポートレットを削除したいと思っています
Liferay.Pまたはtlet.close(jQuery('#p_p_id_' + my_pまたはtlet_id + '_').get(0), true, {});
または
Liferay.Pまたはtlet.close(document.getElementById('p_p_id_' + my_pまたはtlet_id + '_'), true, {});
where second parameter is skipConfirm. Take a look at /ROOT/html/js/liferaypまたはtlet.js
In your template you could test fまたは whether to show close button/icon with
#if ($pまたはtletDisplay.isShowCloseIcon())
...
#end