[MAGNOLIA-4103] Channel name should be provided by configuration Created: 14/Feb/12  Updated: 10/Mar/21  Resolved: 10/Mar/21

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 4.5
Fix Version/s: None

Type: Task Priority: Major
Reporter: Samuel Schmitt Assignee: Unassigned
Resolution: Outdated Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MAGNOLIA-5218 Channel detection applies on edit mod... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

A nice to have would be to configure the channel name.

For the moment it is returned "harcoded" by the channelResolver.

For me the resolver should say: yes or not it's resolved and the channel name come from the config, either the name of the node or a name property.

Furthermore, channel configuration under Templating Kit > Channels should provide channel names resolved by one given resolver, taking into account that one resolver can resolve more than one channel. Channel config should thus become the place where modules providing their own resolver will write channel names
they are able to resolve (and doc should make clear that first match wins here).



 Comments   
Comment by Federico Grilli [ 21/Mar/12 ]

Tentatively put into 4.5.2

Comment by Jan Haderka [ 30/Mar/12 ]

DeviceChannelResolver provides basic configuration. Functionality of this class allows resolving multiple channels which makes it impossible to use node name as a name of a channel and would also make it complicated to make name of each channel configurable. Similar to TemplateAvailability this class provides implementation that should be suitable for most users. In case of need of more specialized or more configurable resolver this class can and should be replaced with custom implementation.

Comment by Antti Hietala [ 10/Apr/12 ]

The problem is that the current channel implementation is not transparent. It is not possible for a user to know which resolver resolves his channels by looking at the configuration. He must look in the source code. Furthermore, the mapping between channels and variations is not transparent either.

I can describe this in documentation to mitigate the issue. However, I suggest we fix the root cause:

  • When a module registers a channel resolver, the module should be responsible for creating channel nodes in /server/rendering/channelManagement/channels. For example, DeviceChannelResolver should register three channels - desktop, smartphone and tablet - with a visible configuration node for each.
    + channels
      + tablet
        + resolver
          - class = info.magnolia.module.devicedetection.DeviceChannelResolver
      + smartphone
        + resolver
          - class = info.magnolia.module.devicedetection.DeviceChannelResolver
      + desktop
        + resolver
          - class = info.magnolia.module.devicedetection.DeviceChannelResolver
    
  • The excludeChannels control, which renders the checkbox options on the Output Channels tab, should read available channel names from the configuration nodes. The user should not need add these options manually. This mitigates the risk of adding wrong channel names.
  • Channel names should follow a strict nomenclature. For example, tablet is a great channel name because an editor can understand how to make his content work on a tablet. However, device is bad channel name because an editor does not understand how to make content work on a "device". (What kind of device? How big? Touch or keyboard? etc.) Device is a dimension, not a channel. Here are examples of dimensions followed by channels in that dimension:
    • Device: smartphone, tablet, ipad, xbox, kindle
    • Location: europe, us, non-us, basel, in-store
    • Format: html, pdf, xml, epub, rss, text
    • Returning-visit: first-time-visitor, returning-visitor
    • Job-role (as captured on a form for example): manager, engineering, sales, communication
  • A resolver can resolve more than one channel, just like DeviceChannelResolver does. Therefore, the resolver should NOT be named after any single channel. It should be named after the dimension. DeviceChannelResolver is a good name. TableChannelResolver is a bad name.
Comment by Jan Haderka [ 10/Apr/12 ]

Needs further discussion.

Comment by Jan Haderka [ 09/Oct/12 ]

Definitively not something that can be changed in the minor release.

Generated at Mon Feb 12 03:52:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.