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

web content templates - there is no .vars[''] in velocity language



      Default velocity macros for Web Content Structure fields are syntactically incorrect.

      LPS-66743 puts .vars[] into velocity macros, however that is valid only for Freemarker language.

      The last good version is : 6.2.10-SP15 with portal-130.

      Steps to reproduce

      1. Go to Admin > Site Administration > Content > Web Content
      2. Go to Manage > Structures and add a structure with, for example, a text field called Text1777, save
      3. Associate a Velocity template to such structure
      4. Call the text field by clicking on it on "Text" (left side) under "Fields"


        Template editor to add $Text1777.getData()

        Actual behavior

        Such action will add $.vars['Text1777'].getData(), which looks like an incorrect Freemarker for $



      It needs a full test for all the field types + switching on repeatable (and without repeatable)
      So a deeper test:

      1. create a web content structure with
        1. all the fields
        2. plus all the fields sets them to repeatable
      2. create a velocity template for this
      3. create a content with this structure
      4. display the content in a Web Content Display portlet
      5. check if everything works well
      6. do the same with Freemarker Template


          Issue Links



              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created:
                  Days since last comment:
                  3 years, 32 weeks, 1 day ago


                  Version Package
                  6.2.X EE