Multilingual, Image Processing and Content Structure

Yes, and @Yudy_Ananda I’m sorry I didn’t see that thread earlier. In a multilingual context your project now olds several sites (one for each language).

.Site or site refers to the current site (in engligh, your english site and its content, in spanish your spanish site and its content etc…).

so with the given example .Site.GetPage "/uploads" will only find a page on the english “pages” of the site.

That’s when .Sites becomes handy as this slice contains every sites (every language sites) and you can fetch the default language site using .Sites.First.

So:

{{ $uploads := .Sites.First.GetPage "/uploads" }}

Hope this helps.

2 Likes