Adding breaks <br> to navigation elements
I need to make a navigation menu like this (notice the breaks):
Some text
here
Some more
text here
Other text
here
My question: how do I add
to a link?
Some text
here
Some more
text here
Other text
here
Does anyone know how to do this with Contao? It would be great if I would not have to resort to a custom template, so the client doesn't need to dig into that in case he needs to change something...
UPDATE: I have used str_replace('/break/','
', $item['link']); in the standard nav template, and in the Site Structure I added /break/ to the page name. This is ugly but it works. Any suggestions for a less ugly solution are VERY welcome ;)
Re: Adding breaks <br> to navigation elements
It's possible to modify the field to accept HTML code, but that would likely break or look very ugly anywhere else a page label is referenced (i.e. in the back-end or a meta title).
If you just need it to wrap at a certain width -- instead of needing to specify exactly which words, maybe you can try doing this in CSS by limiting the widths of the navigation links, forcing them to wrap.
Re: Adding breaks <br> to navigation elements
what about changing the field to accept a linebreak. (or replace /break/ with a linebreak char). The backend willh. ignore, but css in the frontend could be white-space: pre;