I still struggle with translating my site based on Umazel theme. I have added some new Vorto properties on the document type Content Page to be able to translate the pages.
When I create a new page using this modified document type all seems fine except that any sections that I add under the Page Elements does not render.
When debugging the template pageInner.cshtml and the code part
if (currPage.Descendant(FolderSections.ModelTypeAlias) != null)
{
var items = currPage.Descendant(FolderSections.ModelTypeAlias).Children();
foreach (IPublishedContent item in items)
{
//Pass a value to make specific partials be pushed down a bit if no background image is set and they are first on the list.
bool pushDown = string.IsNullOrEmpty(currPage.PageBackgroundImage) && item.Equals(items.First());
bool useHorizontalRule = (item.Equals(items.Last())) ? false : true;
@Html.Partial("PageSectionRenderer", item, new ViewDataDictionary { { "useHorizontalRule", useHorizontalRule }, { "pushDown", pushDown } })
}
}
it seems that the code does not find any descendants to the Page Elements with the Aliastype ”folderSections”. This is very strange, and I cannot figure out why it works when I am using the preview function in Backoffice.
Sections does not render
Hi Guys,
I still struggle with translating my site based on Umazel theme. I have added some new Vorto properties on the document type Content Page to be able to translate the pages.
When I create a new page using this modified document type all seems fine except that any sections that I add under the Page Elements does not render.
When debugging the template pageInner.cshtml and the code part
it seems that the code does not find any descendants to the Page Elements with the Aliastype ”folderSections”. This is very strange, and I cannot figure out why it works when I am using the preview function in Backoffice.
Is there anybody who can guide me?
BR Inge
One more notable thing is, when deploying the same code and content to UaaS the problem disappears there.
When running the site locally in Visual Studio 2017 I have the problem above.
I managed to solve the issue by cloning down a new fresh copy from project on UaaS.
But I still cannot figure out why it was ok when previewing it and not ok when I closed preview.
Maybe it has somethin to do with Visual Studio.
is working on a reply...