code: private String getCategoryLabel(String categoryPath) {
  
          CmsObject cms = A_CmsUI.getCmsObject();
          String result = "";
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(categoryPath)) {
              return result;
          }
          Locale locale = UI.getCurrent().getLocale();
          CmsCategoryService catService = CmsCategoryService.getInstance();
  
          try {
              if (m_useFullPathCategories) {
                  //cut last slash
                  categoryPath = categoryPath.substring(0, categoryPath.length() - 1);
  
                  String currentPath = "";
                  boolean isFirst = true;
                  for (String part : categoryPath.split("/")) {
                      currentPath += part + "/";
                      CmsCategory cat = catService.localizeCategory(
                          cms,
                          catService.readCategory(cms, currentPath, "/"),
                          locale);
                      if (!isFirst) {
                          result += "  /  ";
                      } else {
                          isFirst = false;
                      }
                      result += cat.getTitle();
                  }
  
              } else {
  
                  CmsCategory cat = catService.localizeCategory(
                      cms,
                      catService.readCategory(cms, categoryPath, "/"),
                      locale);
                  result = cat.getTitle();
              }
          } catch (Exception e) {
              LOG.error("Error reading category " + categoryPath + ".", e);
          }
          return result;
      }
docs: Returns the label for the given category.<p>
  
  @param categoryPath the category
  
  @return the label