Open "External Link" in New Window - CMS Menu
wesleyboar opened this issue · 1 comments
wesleyboar commented
Status
Migrated to JIRA FP-1451.
Archived
Alternative
- #178
(as of 2021-07-22) Caveat: This does not work on Portal pages.
Goal
Any link within the CMS menu to an external website should open in an external window/tab.
Requirements
- Any CMS menu 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.)
Direction
via JavaScript
- Put the JavaScript from #178 into the shared header code.
via Django templating
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)
wesleyboar commented
Migrated to JIRA FP-1451.