Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-98031

As a page author I want to map the URL of link, text editable and image editable elements to text/URL fields of an existing content

    Details

      Description

      As a page author (such as a Marketer) I want to map the URL of link, image and text editable elements to text/URL fields of an existing content so that I can reuse URL already specified in a given content that is already being mapped to other elements of the fragment.

      Context

      Editable Elements of type link

      Currently fragment developers can make a link editable by marking it as an editable element of type link. By doing this the page author who adds the fragment to a page can edit the URL and the text of the link. 

      Mapping to existing content

      For editable elements in a fragment of type text and image, it is already possible to map them to (compatible) fields of existing content instead of inline editing the value. 

      This Feature:

      In this Story, we aim to extend the mapping capability to support mapping the URL of editable elements of type link. It also includes adding the same capability to editable elements of type text and image, which did not previously have links.

      Acceptance Criteria

      Given a content page which has a fragment with a text, link or image element
      When the page author clicks the element, a UI option is shown that lets the user enter a manual URL or to use a field from an existing content which contains the URL
      Then a link is created in the element:

      • In the case of text editable the result will be a <a> element with the text inside and the chosen link
        <a href="link-selected">text-value</a>
        
      • In the case of link editable the result will be a <a> element with the chosen link
        <a href="link-selected">link text</a>
        
      • In the case of image editable the result will be a <a> element with the image inside and the chosen link
        <a href="link-selected"><img>(image content omitted)</a>
        

      Given a content page template which has a fragment with a text, link or image element
      When the page author clicks the element, a UI option is shown that lets the user enter a manual URL or to use a field from an existing content which contains the URL
      Then a link is created in the element:

      • In the case of text editable the result will be a <a> element with the text inside and the chosen link
        <a href="link-selected">text-value</a>
        
      • In the case of link editable the result will be a <a> element with the chosen link
        <a href="link-selected">link text</a>
        
      • In the case of image editable the result will be a <a> element with the image inside and the chosen link
        <a href="link-selected"><img>(image content omitted)</a>
        

      Given a display page which has a fragment with a text, image or link element
      When the page author clicks the element, a UI option is shown that lets the user enter a manual URL or to use a field from an existing content which contains the URL
      Then a link is created in the element:

      • In the case of text editable the result will be a <a> element with the text inside and the chosen link
        <a href="link-selected">text-value</a>
        
      • In the case of link editable the result will be a <a> element with the chosen link
        <a href="link-selected">link text</a>
        
      • In the case of image editable the result will be a <a> element with the image inside and the chosen link
        <a href="link-selected"><img>(image content omitted)</a>
        

       

      Features that don't need to be implemented (yet)

      • Links to display pages (will be done as a separate story)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  7.2.10 DXP FP2
                  7.2.10.1 DXP SP1
                  Master