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
allow the user to show or hide folder pages in the menu #11
Conversation
I don't see why a folder page should ever be shown in the navigation. It's purpose is to explicitly not do that. /cc @qzminski |
The purpose would be to create navigation items that aren't pages themselves, e.g. parents for dropdowns, without having to resort to doing that with CSS classes for example. The original m17folderpage extension followed the same logic. |
You should use the forward page for that. It offers exactly the same functionality as the folderpage, but you can define the target if the navigation (accidentally) is a link. |
Although it is not a part of the initial concept I think it does not harm to have it. However this pull request is a BC break I fear, so it should be improved. @aschempp that does not help because some forward pages may be used as a non-link whereas some as regular link. Folder page type would explicitly always work as a non-link. |
@qzminski it could be released as But why do you think it's a BC break anyway? This would only affect newly created folder pages, not existing ones. |
@qzminski it would probably work because |
However, we must not override the |
Sure. Also I think I should add the |
@aschempp doesn't |
No they won't because only the default value changes. This does not affect existing folder pages in your database. |
Ah sorry I didn't notice that it is done when the page is being updated 🙈 All good then! |
ping @fritzmg |
Done. I have made the following changes:
|
Any further comments? |
RTM to me. @terminal42/pilots ? |
No idea, that's not my baby. Feel free if it's okay to you :D |
@aschempp your call then. |
Imho it's better to let the user decide whether a folder page should be shown in the menu or not. See also #8 (comment)
However this way the user can 'accidentally' show an URL for a folder page in the front end, if the used navigation template is not based on the
nav_default
template of this commit.I could add a
generateFrontendUrl
hook that simply creates\Contao\Environment::get('url')
(i.e. scheme and host) for example. I am not sure that's worth it though.