You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Purpose

The Problem

Here you see 3 types of common use cases to specify links. A single link field is often not enough. Users and developer have a lot of ideas for links, which are often not easy to manage via the standard fields. It ends up in a complete mess of Switchable Fields combined with composite fields. I also saw a combination of a multi value, switchable, combosite field (weird).
The JCR structure is also complex and ends up in a lot of useless code. If you think of new ways to maintain content like stories apps this could be even more complex because beside Internal, External and Download links you probably have links to News Article or Events...

For the Author this is as well a desaster. It's not easy to understand this mess of fields.


Goals

Make it a joy to use links in a couple of ways, flexible and extensible.

Use Cases

  • Link fields if a user needs to decide what to link. This could be a teaser, link component or even a redirect page template.
  • Common features for links are:
    • Author defines a link text, or it's picked up from the linked page or asset
    • Author references to a internal page, download or uses a external page
    • User want's to define if the link is opened in a new window or not
    • Users want's to define an anchor tag inside a page. "Link Suffix"

Proposal

Concept

This is a working example of an advanced link field. It's an CK Editor which is only one line and you can just define links. Enter or Shift Enter are blocked. It's only generating an a-Tag without <br> or <p> wrappers.

The nice thing behind it is that you can easily define anything you like. You can add formatting if needed and you can easily add it into a multi value context.
This type of field is nice if you want exactly the criterias of the screenshots above.

But it has downsides, which are not solved yet, but i guess this should not be a show stopper:


Reasoning

Pros:

  • It's all saved into one field which makes it easier 

Cons:

  • This solution relies on CK Editor which is hard to configure if you are not familiar with it.

Implementation

Thoughts

  • There are two kinds of link fields possible
    1. You can define a link text on your own. But you want to split the link and the linktext into seperate variables.
    2. You can define no specific link text.
  • No labels