November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
As far as I remember there were some naming issues on how WebPages are building rendering context for the current item to render. Try to rename TwoColumnLayoutBlock from "LeftColumn" to anything else. Have a working sample in alloy - Block1, main instance "asdf", 2 other child instances "qwer1" and "qwer2". I can put "qwer1" in "asdf" left column and "qwer2" in left column.
From content area rendering perspective there shouldn't be any issues regarding cascade hierachy of the blocks - they are just yet another content to resolve, select and render.
Thank you for your response Valdis.
I tried to change names for some random convention and I still have this issue.
My current tree looks like that:
And still my error seems the same. Stack trace points the .cshtml View for TwoColumnLayoutBlock line which tries to access to Model.LeftColumn property.
Strangely if I remove asdf890 from qwerty123 ContentArea, everything works fine.
If I add to qwerty123 ContentArea instance of other Block (not TwoColumnLayoutBlock), it works fine too!
Hello again.
We have found the issue. It was hidden in excessive StructureMap container intialization, but Error Output did not point it in any way :/
However thank you Valdis for your help :)
We can mark this as solved and closed.
Hi, we have met quite unexpected problem with shared blocks.
Scenario assumes that we have shared block which provides some ContentArea with specific layout and we would like to allow users to nest itself to provide maximum flexibility in content managment.
I define this block:
With default Controller and this View:
Than I create Two instances of TwoColumnLayoutBlock in CMS named "MainLayout" and "LeftColumn" and I put LeftColumn in MainLayout.LeftColumn property as content.
If I try to add MainLayout to my main page content area I get some ugly error:
I would be very grateful if someone could point me some errors in my approach. In theory there is some recurence going on, but in fact LeftColumn block does not reference any other block, so it seems a little bit strange to me.
Sincerely
Maciej Błaszczyk