Uploaded image for project: 'Multiple Pages Apps '
  1. Multiple Pages Apps
  2. MGNLMULTPA-28

Test Fragments Use case - on Freemarker

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Neutral
    • None
    • None
    • None

    Description

      Lets see if current impl supports the main Pages app gettting contetn from another custom one created with this module. Create a demo project to show what does and does not work.

      Develop the following for both Freemarker and SPA approach.

      Scenario:

      • Create pages app called Banners.
      • In that app, create a "banner" (actually a page) with a few sub componntss.
      • Create a "Banner" templating componenent. The dialog lets you choose a page from the "Banners" app. (via a link field.)
        • (This is a typical usecase, but usually is done linking either to a normal content app, or linking to another Page in the Pages app. ie  a "Teaser" component.)
      • Make the component available on some pages.
      • Author: On the normal Pages app, create a new page. Use the "Banner" templating component on that page.

      Expectations:

      • The Page in the Pages app renders content - including from the Banner.
      • If the banner is changed- then the page shows the new content.

      Note:

      I think the main work is to create the Banner templating component. I think everything else should basically already be in plaace.

      Here is the "skeleton" of a demo project which shows off the similar use cases with linking to other pages and linking to content items: https://git.magnolia-cms.com/users/czimmermann/repos/page-fragments-demo/browse

      Tips:

      See the existing "Campain Manager" module which has basically implemented similar functionality. But the Campaign Manager also has a whole scheduling and "slots" concept that we do not need/want here.

      For both Freemaker and SPA, See:

       

       

      For SPA - See: https://docs.magnolia-cms.com/campaign-manager/integrate.html

       

      Additional References:

      Freemarker: https://git.magnolia-cms.com/projects/INCUBATOR/repos/campaign/browse/campaign-manager/src/main/resources/campaign-manager/templates/components/managed-campaign.ftl

      assign campaignAreaNode = campaignfn.getCampaignManagedArea(campaignNode)! 

      [@cms.area content=cmsfn.asContentMap(campaignAreaNode) area=campaignAreaDefinition editable=false/]

      Tip: Look into campainfn... maybe create "fragmentfn" for more general case.

       

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            1.
            Implementation Sub-task Closed Unassigned
            2.
            Review Sub-task Closed Unassigned
            3.
            Pre-Integration QA Sub-task Closed Unassigned
            4.
            QA Sub-task Closed Unassigned

            Activity

              People

                chuong.doan Chuong Doan Huy
                czimmermann Christopher Zimmermann
                DeveloperX
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Work Started:

                  Checklists

                    Task DoR