code: protected String getDetailLink(CmsResource pageRes, CmsResource detailRes, Locale locale) {
  
          String pageSitePath = m_siteGuestCms.getSitePath(pageRes);
          String detailSitePath = m_siteGuestCms.getSitePath(detailRes);
          CmsRequestContext requestContext = m_siteGuestCms.getRequestContext();
          String originalUri = requestContext.getUri();
          Locale originalLocale = requestContext.getLocale();
          try {
              requestContext.setUri(pageSitePath);
              requestContext.setLocale(locale);
              return OpenCms.getLinkManager().getOnlineLink(m_siteGuestCms, detailSitePath, true);
          } finally {
              requestContext.setUri(originalUri);
              requestContext.setLocale(originalLocale);
          }
      }
docs: Gets the detail link for a given container page and detail content.<p>
  
  @param pageRes the container page
  @param detailRes the detail content
  @param locale the locale for which we want the link
  
  @return the detail page link