In GitLab by @tacc-wbomar on Jan 21, 2020, 12:52
Deliverables
Tickets:
Solutions:
Goal
Any link to an external website should open in an external window. Especially:
Requirements
- Any link to external website should open in a new window when clicked*.
- This feature should not require configuration by CMS user.
* When clicked without modification key from user. (Cmd+ click on Mac browsers opens link in new window.)
Background
Django CMS does not manage this by default. Maybe the CMS user can do this per link. Or maybe not.
This should be a high priority ticket, because the original issue was created too long ago (GL-1), and it is the first request Hedda made fo me for CMS, and she has re-requested a few times.
Direction
See Direction in tickets listed in Deliverables.
Archived
CMS Menu & Article Listing
Use a Django filter "templatetag":
- (Python) Parse any known URL before rendering a link.
- (Python) Conditionally render
target="_blank" attribute in link.
- (Template) Apply the filter to CMS menu markup.
- (Template) Apply the filter to article listing template/s (or a shared partial)
Text Plugin
Unsure. Ideas:
- A. Find a way for CMS user to set link with
target="_blank" and document this step as a requirement.
- B. Author JavaScript to conditionally add
target="_blank" after render for any links whose domain is different.
- Gotcha: This is not possible for old CMS sites, because they do not use the external URL directly—they filter a redirect through a local slug. To remedy this, an array of such "redirect slugs/paths" may be provided to the script.
In GitLab by @tacc-wbomar on Jan 21, 2020, 12:52
Deliverables
Tickets:
Solutions:
Goal
Any link to an external website should open in an external window. Especially:
Requirements
Background
Django CMS does not manage this by default. Maybe the CMS user can do this per link. Or maybe not.
This should be a high priority ticket, because the original issue was created too long ago (GL-1), and it is the first request Hedda made fo me for CMS, and she has re-requested a few times.
Direction
See Direction in tickets listed in Deliverables.
Archived
CMS Menu & Article Listing
Use a Django
filter"templatetag":target="_blank"attribute in link.Text Plugin
Unsure. Ideas:
target="_blank"and document this step as a requirement.target="_blank"after render for any links whose domain is different.