Skip to content

Add follow/nofollow attribute control for web links#576

Merged
alikon merged 8 commits intojoomla-extensions:5.x-devfrom
mahmoudmagdy1-1:component_rel
Mar 23, 2025
Merged

Add follow/nofollow attribute control for web links#576
alikon merged 8 commits intojoomla-extensions:5.x-devfrom
mahmoudmagdy1-1:component_rel

Conversation

@mahmoudmagdy1-1
Copy link
Copy Markdown
Contributor

@mahmoudmagdy1-1 mahmoudmagdy1-1 commented Mar 21, 2025

Pull Request for Issue #559.

Summary of Changes

Adding the ability for administrators to specify the rel attribute for weblinks when adding new links or editing existing ones. The options provided are follow and nofollow, The feature is already implemented in the modules but wasn't implemented in components.

image

image

Testing Instructions

  1. Login as admin: Add new weblink
  2. Verify field appears with options:
    • Follow
    • NoFollow
  3. Check rendered HTML contains correct rel attribute

Expected result

Ability to choose follow or nofollow rel when adding or when adding new links or editing existing ones.

Actual result

No option to choose follow or nofollow rel for links in the pages component when adding new links or editing existing ones.

Documentation Changes Required

@mahmoudmagdy1-1 mahmoudmagdy1-1 marked this pull request as draft March 21, 2025 02:19
@alikon
Copy link
Copy Markdown
Collaborator

alikon commented Mar 21, 2025

if i set No follow in the weblink option for a welbink item
image
the frontend respect the setting

image

the same on the other way

image

@alikon
Copy link
Copy Markdown
Collaborator

alikon commented Mar 21, 2025

can you complete the task with a cypress test ?

@mahmoudmagdy1-1
Copy link
Copy Markdown
Contributor Author

can you complete the task with a cypress test ?

image
I ran a cypress test with this pr and every test passed successfully, do you want me to write a test for the follow / nofollow use case?

@mahmoudmagdy1-1 mahmoudmagdy1-1 marked this pull request as ready for review March 22, 2025 01:47
@alikon
Copy link
Copy Markdown
Collaborator

alikon commented Mar 22, 2025

yes that will be awesome
please move this pr on the new branch 5.x-dev cause we consider this as a new feature
if you need some insight on how to move a pr to another branch , reading this can help
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request

@mahmoudmagdy1-1 mahmoudmagdy1-1 changed the base branch from 4.0-dev to 5.x-dev March 22, 2025 12:32
@mahmoudmagdy1-1
Copy link
Copy Markdown
Contributor Author

can you complete the task with a cypress test ?

I added a cypress test that checks for the rel attribute within the frontend weblink tests

image

Please have a look and let me know what you think, thanks!

@alikon
Copy link
Copy Markdown
Collaborator

alikon commented Mar 23, 2025

well done

@alikon alikon merged commit 88de39b into joomla-extensions:5.x-dev Mar 23, 2025
1 check passed
@mahmoudmagdy1-1 mahmoudmagdy1-1 deleted the component_rel branch March 23, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants