[MAGNOLIA-5741] Add support for multiple active channels Created: 09/Apr/14  Updated: 19/May/22  Resolved: 19/May/22

Status: Closed
Project: Magnolia
Component/s: core, rendering
Affects Version/s: 4.5.17
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Philipp Denzler Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Zip Archive multiple-active-channels.zip    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Testcase included:
Yes
Date of First Response:

 Description   

The default implementation in Magnolia allows only one channel to be active during each request. We needed to have more than one active channel when rendering components or pages to show and hide elements based on the language AND the device at the same time. We came up with the attached solution. (source and some tests included, running in production with Magnolia 4.5.17)

It consists of a custom MultiChannelFilter, which merges all currently active channels in one channel string and components, which extract the channels from this string when rendering nodes and determining variations.

We had to extend and replace the following classes in the Magnolia configuration:

  • MultiChannelFilter -> merges all currently active channels in one channel string, separated by -
  • SiteMergeFilter -> determines a variation based on the available variations, the currently active channels and the extension (URL suffix)
  • RenderingFilter -> splits up the channel name before evaluating if complete pages should be shown or hidden
  • FreemarkerRenderer -> splits up the channel name before evaluating if content should be shown or hidden
  • StkRenderer -> splits up the channel name before evaluating if content should be shown or hidden

It would be nice if a feature like this would be part of Magnolia. We think that displaying content based on multiple channels (language AND device) is a common use case.



 Comments   
Comment by Roman Kovařík [ 19/May/22 ]

Hello,

This ticket is now marked as closed due to one of the following reasons:

  • A long period of inactivity
  • Uses an old or Beta version of an application, module, or framework that we no longer support
  • The issue is no longer reproducible or has been fixed in later versions

If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you.

Thank you,
The Magnolia Team

Generated at Mon Feb 12 04:07:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.