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

Folder either shows empty page or 404 #2075

Closed
kees-closed opened this issue Jun 27, 2018 · 1 comment
Closed

Folder either shows empty page or 404 #2075

kees-closed opened this issue Jun 27, 2018 · 1 comment
Assignees
Labels

Comments

@kees-closed
Copy link

When I create a folder it shows up as a menu, as it should. But when a user clicks on it, it opens a blank page. When I disable routing it becomes a 404. How can I just create a menu item which doesn’t link to anything? What I want to setup is that when someone clicks on it, it only expands the menu, nothing more.

At the moment I created page redirects to one of the folder items in order to hide this problem. But it’s not pretty. Also the TNT Search has some problems with this, when I type in a keyword which is a redirected folder, the page deforms. But that's another issue of course.

@rhukster
Copy link
Member

You're really doing the simplest solution.

Another solution would be to add a custom page header like:

placeholder: true

Then in your Twig template that renders the menu, check this with:

{% if page.header.placeholder %}
... output a <span> for placeholder...
{% else %}
... output a <a> for link ...
{% endif %}

Something like that.

Of course you will need to have CSS support for menu items that are span and others that are the traditional links.

@mahagr mahagr self-assigned this Dec 13, 2019
@mahagr mahagr closed this as completed Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants