You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am enjoying using Piranha, very easy to work with!
My question:
Is there the ability to write a controller for a new block type?
In the block example, it appears that any logic needs to be applied in the view?
I am trying to setup a block that outputs the body element of sub pages based.
For example, block is placed on page1 and outputs the content of page2, page3, page4
page1
-> page2
-> page3
-> page4
I'd prefer to do that logic in a controller and then pass to the view for output.
Thanks,
Paul
The text was updated successfully, but these errors were encountered:
Hi there! The best way would probably to support an Init() method on blocks just like on fields, this would allow for encapsulating logic in the block itself.
Hi I am enjoying using Piranha, very easy to work with!
My question:
Is there the ability to write a controller for a new block type?
In the block example, it appears that any logic needs to be applied in the view?
I am trying to setup a block that outputs the body element of sub pages based.
For example, block is placed on page1 and outputs the content of page2, page3, page4
page1
-> page2
-> page3
-> page4
I'd prefer to do that logic in a controller and then pass to the view for output.
Thanks,
Paul
The text was updated successfully, but these errors were encountered: