reference layout block from content block in episerver 6 R2

53 Views Asked by At

In the OnLoad of a Content Block, can I reference programatically (a method from) the Layout block where it's sitting in? e.g. I've a text content block which I placed in a custom Layout block in Episerver Composer 6 R2, I need to call a method from the Layout block and place the method result in a variable in the content block. Particularly interested in the syntax. Many thanks

1

There are 1 best solutions below

0
Ted Nyberg On

Composer blocks in Episerver 6 are in fact stored as pages in the page tree, albeit hidden from the UI. In other words, you can always traverse Composer content using DataFactory.