Missing docs for translated nested modules
i had problems with translated nested slugs:
even if they work as intended the child will always take the parent component in the default language in the slug.
After a lot of fiddling and reverse enginnering i came with a solution:
https://twillcms.com/docs/modules/nested-modules.html#content-working-with-self-nested-items
Original code:
This code will only return the parent slug in only one language so it does NOT work as intended; to fix it we need to implement the
getLocalizedPermalinkBase()
function that does not have an item.
To fix it i came with this solution:
If you have a more elegant solution or wnat to update the documentation please do so.1 Reply
Furthermore if you translated the path you should also consider adding the permalinkBase
Note: using
setPermalinkBase
on setupController
was ignored and overridden