}
}
public static String makeCategoryUrl(Delegator delegator, CategoryContentWrapper wrapper, List<String> trail, String contextPath, String previousCategoryId, String productCategoryId, String productId, String viewSize, String viewIndex, String viewSort, String searchString) {
String url = "";
StringWrapper alternativeUrl = wrapper.get("ALTERNATIVE_URL");
if (UtilValidate.isNotEmpty(alternativeUrl) && UtilValidate.isNotEmpty(alternativeUrl.toString())) {
StringBuilder urlBuilder = new StringBuilder();
urlBuilder.append(contextPath);
if (urlBuilder.charAt(urlBuilder.length() - 1) != '/') {
urlBuilder.append("/");
}
// append alternative URL
url = UrlServletHelper.invalidCharacter(alternativeUrl.toString());
urlBuilder.append(url);
if (UtilValidate.isNotEmpty(productCategoryId)) {
urlBuilder.append("-");
urlBuilder.append(productCategoryId);
urlBuilder.append("-c");