[MGNLMULTPA-28] Test Fragments Use case - on Freemarker Created: 15/Nov/23  Updated: 29/Nov/23  Resolved: 24/Nov/23

Status: Closed
Project: Multiple Pages Apps
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Chuong Doan Huy
Resolution: Done Votes: 0
Labels: None
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLMULTPA-43 Test Fragments Use case - on SPA Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLMULTPA-29 Implementation Sub-task Closed  
MGNLMULTPA-30 Review Sub-task Closed  
MGNLMULTPA-31 Pre-Integration QA Sub-task Closed  
MGNLMULTPA-32 QA Sub-task Closed  
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: Multiple Pages App LD
Sprint: DevX 51
Team: DeveloperX
Work Started:

 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.

 



 Comments   
Comment by Chuong Doan Huy [ 23/Nov/23 ]

After discovery, we agree that it's possible to implement the logic describe in the ticket.
Output summary : https://wiki.magnolia-cms.com/display/DEVINT/2023-11-22+Scope+of+Fragments+Feature.
Follow up tickets :
https://jira.magnolia-cms.com/browse/MGNLMULTPA-35
https://jira.magnolia-cms.com/browse/MGNLMULTPA-36

Generated at Mon Feb 12 10:20:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.