该网站有 3 个版本:西班牙语、乌克兰语和英语,需要以英语版本没有 /en/ 前缀的方式实现这一点 它应该是这样的: https://example.com/terms/ https://example.com/es/terms/ https://example.com/ua/terms/
<ul class="site-footer__bottom-text-two list-unstyled">
<li>
<a href="/[[!*context_key:is=`web`:then=`ua`]][[!*context_key:is=`en`:then=`en`]] [[!*context_key:is=`ru`:then=`ru`]]/terms/">[[%terms? &namespace=`lang` &language=`[[++cultureKey]]`]]</a>
</li>
</ul>
我可能没有展示所需的所有上下文,但我想了解如何实现这一点。谢谢!
看起来默认情况下将使用您的英语上下文,因此您需要进入其设置(yourwebsite.com/manager/?a=context)并确保相应的
路径中没有
/en/
前缀设置。另外请检查您的上下文是否已加载到根index.php
文件中,基本上有web
上下文调用。另外要小心下一次 MODX 更新,它会使用默认值重写 index.php
,因此您应该意识到这一点并相应地更新文件。