Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-13611

Better support 'link not found' in PageModelAPI

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.3.0
    • None
    • None
    • 0.5
    • Quasar
    • Puma Sprint 239, Puma Sprint 240

    Description

      Below improvement can be done for PMA v0.9 and 1.0

      Currently, we have links something like:

      "links" : {
                  "site" : {
                    "href" : "/news",
                    "type" : "internal"
                  }
                }
      

      and in html content something like"

      <a href=\"/news\" data-type=\"internal\">news</a>
      

      the type (data-type) can be one of these at the moment:

          public enum LinkType {
      
              RESOURCE("resource"),
              EXTERNAL("external"),
              INTERNAL("internal");
      

      However, a link can be to a document for which NO URL can be created in the HST sitemap OR a link can be to a deleted or not live document. In that case, we have a broken link. We need to include a type for that.

      After discussing with mdokolin, we decided that the SPA has enough info if for a unresolvable link we serialize it as:

      "links" : {
                  "site" : {
                    "type" : "unknown"
                  }
                }
      

      or

      <a data-type=\"unknown\">news</a>
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: