@pamtbaau:
- Your demo does not match your intro. They seem different stories.
- The intro is quite long-winded and not succinct.
It might seem that way, but it's all related. I just can't describe one issue without mentioning another, because it loses context and the solution would be almost obvious, but that solution then raises another issue. As I said - a closed circle :(
@pamtbaau:
You didn’t make clear what the issue was you were trying to show with the demo.
- What did you expect to see?
- What are you seeing?
I thought I said it multiple times :/ Want to see forms working without ruining other parts of the website. Now they just don't :/
@pamtbaau:
- English page: The route ‘/contact- us /form’ does not exist and should be ‘/contact- me /form’
- Lituanian page: Route ‘/contact-us/form’ does not exist and should be ‘/susisiekime/form’
Change the route and form is shown.
Route doesn't - folder does. Changing it doesn't change the behavior in any way - there's still a redirect when you try to get to that page and form is gone. As I replied on GH, Grav handles folder based URLs fine, but it also redirects. So basically it is capable of finding pages based on folder path. And just hardcoding a slug route there of one language if page is opened in another would be the same as hardcoding folder path - Grav would still find it.
@pamtbaau:
Ergo, the template fails because the form is defined in to different routes.
The design of template ‘contact-us.html.twig’ is flawed.
It doesn't fail if there's no redirect. After redirect, no matter which approach you choose, even with hardcoded values, forms() is not finding any form. That's not a flawed template.
@pamtbaau:
Also be aware that the action routes of the form is slug dependend.
That why I have them separate. But again, turning off redirect and leaving one action - /contact-us/form - works fine in both languages. No redirect - no trouble.
@pamtbaau:
cache_enable: false is not needed anywhere for the forms to display.
It's a leftover when I was testing all the variations of pages. Yes, it doesn't change anything.