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

As a developer I like to have all article data in a JournalArticle template

Details

    Description

      When I write a JournalArticle template, I have quite a hard time to access some of the relevant information. Several fields are simply not available. On top of that, using things like .vars['reserved-article-create-date'].data feels clumsy and is certainly not intuitive.

      The list of missing data fields and information is pretty long:

      • the groupId of the article
      • categories
      • tags
      • which translations are available
      • the raw article content
      • the article itself (some helper functions nedd the article)
      • the asset entry (some helper functions need the assetEntry or at least the id)
      • folderId/folderName (While the folder is not real and just cosmetic, it is still a convenient way for editors to order and in some way "categorize" articles)
      • isIndexable
      • status
      • related entries
      • custom fields
        ...

      Please note that this list is not complete and some things like categories are more needed that others (isIndexable, status) and some like "the article itself" already contain some attributes.

      I propose to introduce a new variable "currentArticle" that allows me to access these data fields and provides methods like getRelatedEntries and getCategories(). While it could be necessary to introduce a Helper class instead of adding these methods directly, it would be convenient to have a "single point of access" to all the information of the article, I would also like to be able to access the article fields through this object instead of the exitsting TemplateNode objects.

      Note: The fields in this object should be made available in fragments too.

       

      Attachments

        Issue Links

          Activity

            People

              julia.molano Julia Molano
              crabel Christoph Rabel
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Packages

                  Version Package