Details

    • Type: Story
    • Status: Closed
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sprint:

      Description

      In (for example) twig templates the use of getIntro(), getContent() and getDescription() sometimes need some logic (depending on which fields are filled). It is not desired to place this logic in each template for several reasons: templates need to be clean and the logic can change in the future.

      It is also not desired to put this logic in the normal getters, because you need to be able to use the fields without that logic (and they are also used in forms).

      So it is better to introduce seperate getters:
      getPublishedTitle --> returns what currently is defined as title in the Solr mapping (this implementation can be different per content type)
      getPublishedIntro --> gives intro, if not available gives first paragraph of content
      getPublishedContent --> gives content, if an intro is available the first paragraph is skipped
      getPublishedDescription --> gives description, if not available gives getArticleIntro

      If no information is available it should return in empty string. (such as Intro for a File object)

      These must be added to the contentinterface and should available always for content.

      Please also update the unit tests to with the new getters.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marijn Marijn Otte
                Client:
                Marijn Otte
                Code reviewer:
                Marijn Otte
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Follow up date:

                  OTM