Mentor Web Blocks has the capabilities to render Razor, Usercontrols, and XSLT which is chosen in the Macro. Each has it's own interface to get the current page and the current block being rendered. Below you will find the API / Methods available to you/
When programming in Razor, the Model is the block that is being rendered. To get the current page node, see the below available API methods.
Returns the current page node.
dynamic currentPage = @WebBlocks.GetCurrentNode();
Returns a node based on the id chosen.
Adds a class to the block control.
Before: <div>[content to render]<div>
After: <div class="grid_3">[content to render]</div>
||Removes a class from the block control.
Changes the block control to be rendered as another element.
Before: <div>[content to render]</div>
After: <span>[content to render]</span>
Returns a string response from a uri.
(Hint: Use this helper method to retrieve things like twitter feeds etc)
When creating your usercontrol that will be rendered by Web Blocks, inherit WebBlocksUserControl. This is located in WebBlocks.BusinessLogic.DLL. This will give you access to two properties.
||This is the current Block so that you can access the properties set on the block. This is a dynamic object so you can reference your properties the same as you would in Razor. For example, Block.pageTitle
||This is the current page node. This is how you access the properties set on the current page. This is also a dynamic object, so you can access properties the same as you would in Razor.
When rendering your block with XSLT, you can access the current page using $currentPage. This naming convention makes sense for it to be the current page. To access the block you must reference WebBlocksXslt:GetCurrentBlock().