Menu Links do not set target properties in links
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
After setting the target for the menu link as shown below:
None of the settings actually set the target in the HTML no matter which option is chosen:
After configuring a Menu Link with any of the available Target options (Same Window, New Window, or Parent Window) and publishing the change, the selected target is not reflected in the generated HTML.
For example:
Same Window should generate target="_self"
New Window should generate target="_blank"
Parent Window should generate target="_parent"
However, regardless of which option is selected, the rendered element contains no target attribute, causing every link to behave as though it were opened in the current window.
Steps to Reproduce
Steps to Reproduce
- Create or edit a Menu Link.
- Configure it as an External Link.
- Select any Target option (Same Window, New Window, or Parent Window).
- Save and Publish.
- Render the page containing the menu.
- Inspect the generated HTML for the corresponding element.
Acceptance Criteria
The generated HTML should include the appropriate target attribute based on the selected option.
Examples:
<a href="https://usage.dotcms.cloud" target="_self">Usage Analytics</a>
<a href="https://usage.dotcms.cloud" target="_blank">Usage Analytics</a>
<a href="https://usage.dotcms.cloud" target="_parent">Usage Analytics</a>
dotCMS Version
Latest Evergreen
Severity
Low - Minor issue or cosmetic
Links
NA - auth site build
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Menu Link target setting for external links through configuration and rendering, then inspect the generated HTML for the corresponding anchor. Reproduce the issue with Same Window, New Window, and Parent Window selections; done means each renders its expected target attribute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 62/100