Closed Defcon0 closed 6 years ago
Why do you want to select root pages? Those are not "real" pages.
It's because of their title. The first page's title is "Startseite" ("Home" in English) whereas the root page's title is the title of the other domain ;-) Setting the title of the first real page ("Startseite") to the domain's name is no option in the context of this domain.
It's no technical issue but a contextual one.
In such a case I would create a internal redirect page with the title you desire and select that in your custom navigation module.
Possible but sounds a bit like a workaround ;-) But ok, it's possible ;-)
It seems to me that a workaround is only required because of your prerequisites:
Setting the title of the first real page ("Startseite") to the domain's name is no option in the context of this domain.
@contao/developers Should we allow root pages in the custom navigation?
It makes no sense to generate a navigation with root page types. I don't see any use case here.
@leofeyer
Setting the title of the first real page ("Startseite") to the domain's name is no option in the context of this domain.
If I'd do so, all other navigations would have the corporate's name in them. Imagine a navigation like:
ACME Corp. | About us | Downloads | Imprint | ...
Understandably the customer wants the first point to be "Home" or something like that. Of course I could do all that logic in the template, but this wouldn't be necessary if one could just select the roots.
I thought you didn't want it to be Home?
No ;-)
Needed situation is that the root is named like the domain (or company) and the first page is named „Home“. Now we need a custom nav where we select the roots so that the links are named like the domains (or companies).
The situation now is that we can without modification only have a nav list containing 4 times „Home“ because we cannot select the roots ;-)
As discussed in Mumble on August 30th, we want to include root pages in the custom navigation menu.
Implemented in contao/contao@912e3f7a64e92f808a086797d27ebb207b8dc479.
One "problem" I have with this are the generated URLs for the root pages. The contain the alias of the root page, which does not make much sense. The URL will then redirect you to the start page. (Unless that has changed already?)
So you suggest using the title of the root page but the alias of the first child page? Isn't that confusing for the users?
Wouldn’t it be better to use no alias at all?
The root page linking to example.com/
or example.com/en/
(depending on the prepend_locale
setting) would make sense to me.
Yes, ideally the generated URL for a website root should be just the domain (and language, depending on prepend_locale
).
So you suggest using the title of the root page but the alias of the first child page? Isn't that confusing for the users?
That is how internal Redirect-Pages without specific target work and i don't think it is confusing.
But linking to domain.tld/[locale]
without any alias sounds reasonable.
Implemented in contao/contao@3c92fb923e13678c7d47fe397ca6f398ff596515.
Awesome, thanks :+1: !
Hello,
why is this the case? Would it be possible to include them? In fact I can choose them in the configuration in the backend but they won't be delivered.
Bye