code4romania / code4romania/website-factory

🚧 [Pages] Create a redirect type of page

Open
#673 0 comments 0 reactions 1 assignee Claimed by @overeha View on GitHub
enhancement :rocket: needs-info
Dominant language
PHP
Stars
26
Forks
18
Avg merge
1m
Merged PRs (30d)
14

Description

🚧 THIS ISSUE IS CURRENTLY A DRAFT 🚧

**Is your feature request related to a problem? Please describe.**

Some pages' URLs can change over time, and if the old link is still used somewhere, you need to keep two copies of that page.

**Describe the solution you'd like**

Create a new type of page that redirects the user to a URL.
The URL shouldn't be a Text input field but a component similar to the page selector from the header/footer settings to make things as clear as possible.

When the user clicks on `Add` to add a new page, there should be a dropdown to allow the user to select between `Page` and `Redirect`.

The only editable component should be the slug. The page title should not be editable, it should be `Redirect: [page to redirect to]`.

**Additional context**

A simple Text input URL field would be susceptible to issues over time if the domain or page URL changes.
![Screenshot 2024-03-21 at 10 35 50](https://github.com/code4romania/website-factory/assets/2820084/9263db81-9ed9-4b54-9dde-a52e6a91ff8e)

The Header/Footer page input field is much more reliable in connecting internal & external pages.
![Screenshot 2024-03-21 at 10 35 04](https://github.com/code4romania/website-factory/assets/2820084/eecb6c41-9d0a-448d-a751-19c536e4d5c5)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.