Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent Page Redirect #80

Open
drewroberts opened this issue Apr 13, 2021 · 2 comments
Open

Parent Page Redirect #80

drewroberts opened this issue Apr 13, 2021 · 2 comments
Assignees

Comments

@drewroberts
Copy link
Owner

There should be an option with Pages (#15) that allows a Page to redirect & route visitors through the Controller to the parent Page.

An example of a use case for this is with Pages that are created for Locations (TIPOFF/locations#42) where there is only 1 Location in a Market (TIPOFF/locations#41). In that case, I want to redirect the visitor to the parent Page (the Market page).

@drewroberts
Copy link
Owner Author

If the parent redirect is enabled on a page (I'm thinking a boolean in the database, but whatever is best) and the page does not have a parent, then it should redirect to the website's homepage.

@pdbreen
Copy link
Collaborator

pdbreen commented Apr 13, 2021

If the parent redirect is enabled on a page (I'm thinking a boolean in the database, but whatever is best) and the page does not have a parent, then it should redirect to the website's homepage.

I used the existing location_based flag to trigger the redirects / path building, so the redirect to the home page gets triggered on a location based root page IF and only IF it is the ONLY location based root page.

edit: changing the name also won't change this logic. The locations package will always be setting the flag true for location and market, so honoring the flag becomes conditional on whether its the only root page with the flag set or its the only child.

drewroberts added a commit that referenced this issue Apr 14, 2021
Update BlogController and PageController logic for #79 and #80
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

No branches or pull requests

2 participants