code: public String getPermalinkForCurrentPage(CmsObject cms) {
  
          return getPermalink(cms, cms.getRequestContext().getUri(), cms.getRequestContext().getDetailContentId());
      }
docs: Returns the perma link for the current page based on the URI and detail content id stored in the CmsObject passed as a parameter.<p<
  
  @param cms the CMS context to use to generate the permalink
  
  @return the permalink