Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-11972

[ContentType] View: add option on including another view to keep duplicated model items

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.LATER
    • 4.8.0
    • None
    • None
    • 1 - Middle term
    • 2 - Normal

      On including a view from another view (by <include> tag), we should be able to keep duplicated model items if we want.

      Currently:

      <view name="a">
          <item ref="title"/>
      </view>
      
      <view name="b"/>
          <item ref="title"/>
          <item ref="attr1"/>
      </view>
      
      <view name="c">
          <item ref="title"/>
          <include view="a"/>
          <group>
              <include view="b"/>
          </group>
      </view>

      View c is transformed as this:

      <view name="c">
          <item ref="title"/>
          <group>
              <item ref="attr1"/>
          </group>
      </view>

      We should be able to define this (or another syntax):

      <view name="c">
          <item ref="title"/>
          <include view="a" keep-duplicates="true"/>
          <group>
              <include view="b" keep-duplicates="true"/>
          </group>
      </view>

      To obtain this:

      <view name="c">
          <item ref="title"/>
          <item ref="title"/>
          <group>
              <item ref="title"/>
              <item ref="attr1"/>
          </group>
      </view>

      Maybe we could have a syntax to keep duplicates of other levels but not same level too.

            Unassigned Unassigned
            bmaurel Bérénice Maurel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: