Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7458103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:24:22+00:00 2026-05-29T13:24:22+00:00

I have a portlet with my own template and which has <use-default-template>false</use-default-template> in it’s

  • 0

I have a portlet with my own template and which has <use-default-template>false</use-default-template> in it’s config.

What if I wish to make my own button to remove my portlet from a page? How to handle remove operation? What URL to query? How to know if current user has permission to remove portlets?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T13:24:22+00:00Added an answer on May 29, 2026 at 1:24 pm

    I am assuming you wish to remove portlet from javascript, if so

    Liferay.Portlet.close(jQuery('#p_p_id_' + my_portlet_id + '_').get(0), true, {});
    

    or

    Liferay.Portlet.close(document.getElementById('p_p_id_' + my_portlet_id + '_'), true, {});
    

    where second parameter is skipConfirm. Take a look at /ROOT/html/js/liferayportlet.js

    In your template you could test for whether to show close button/icon with

    #if ($portletDisplay.isShowCloseIcon())
       ...
    #end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom portlet which use 2 parameters I wrote in my portlet-conf.properties.
I have a portlet which has many rendering and action methods: @Controller @RequestMapping(VIEW) public
I have a JSF Portlet which has user form in the view JSP. The
I have two portlets: Portlet-A and Portlet-B. Portlet-A make some data initialization and stores
I have created a my-services-portlet in which i have AbcService, which I am calling
I have this html: <div class=portlet-header> Company Information ... <button> some button here </button>
I have a portlet which opens a popup on click of link on it.
I have html which looks somethine like this <div class=portlet portlet_30> <div class=portlet_header portlet_header_30>
I have a web application with few spring portlets. Every portlet has an xml
I have a portlet with a button in it. when this button clicked I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.