Language variants - how to get URL for default language version of page if culture-specific page does not exist
We have a menu with 3 items e.g. Page1, Page2, Page3. All 3 items are the same document type.
Page3 has two languages, however, Page1 and Page2 only have the default language.
How can we render a culture-specific menu with Page1 and Page2 pointing to the default language version of the pages, and Page3 pointing to culture-specific version?
e.g.
Page1 = website/page1
Page2 = website/page2
Page3 = website/zh/page3
I can access all 3 pages using home.ChildrenForAllCultures, and I can get the page heading using page.Value("pageHeading", fallback: Fallback.ToDefaultValue, defaultValue: page.Name), but I can't figure out how to get the correct url for the default language page.Url = "#" and page.UrlSegment is null
There doesn't seem to be an option to get the default language version of a page so you can access standard page properties such as the url.
Language variants - how to get URL for default language version of page if culture-specific page does not exist
We have a menu with 3 items e.g. Page1, Page2, Page3. All 3 items are the same document type.
Page3 has two languages, however, Page1 and Page2 only have the default language.
How can we render a culture-specific menu with Page1 and Page2 pointing to the default language version of the pages, and Page3 pointing to culture-specific version? e.g.
I can access all 3 pages using
home.ChildrenForAllCultures
, and I can get the page heading usingpage.Value("pageHeading", fallback: Fallback.ToDefaultValue, defaultValue: page.Name)
, but I can't figure out how to get the correct url for the default languagepage.Url = "#"
andpage.UrlSegment is null
There doesn't seem to be an option to get the default language version of a page so you can access standard page properties such as the url.
Hi,
You can find an explanation and solution in the article: Problem with linking in Umbraco across pages in different cultures.
is working on a reply...