code: protected String buildGalleryUrl() {
  
          String basePath = "";
          basePath = "/system/workplace/commons/gallery.jsp";
          basePath += "?dialogmode=widget&fieldid=" + m_id;
          if (LINK.equals(m_type)) {
              basePath += "&" + I_CmsGalleryProviderConstants.CONFIG_RESOURCE_TYPES + "=pointer";
          }
  
          String pathparameter = m_selectionInput.m_textbox.getText();
          if (pathparameter.indexOf("/") > -1) {
              basePath += "&currentelement=" + pathparameter;
          }
          basePath += m_config;
          return CmsCoreProvider.get().link(basePath);
      }
docs: Creates the URL for the gallery dialog IFrame.<p>
  
  @return the URL for the gallery dialog IFrame