<link href='https://www.blogger.com/dyn-css/authorization.css?targetBlogID=5475212579414909827&amp;zx=ea95328a-a0c7-498f-a74f-685690313b68' rel='stylesheet'/>

Mittwoch, 6. Februar 2013

Finished first examples on custom render spots and provider

The custom render tags API documentation now contains the first two getting started examples for implementing a custom render spot and a custom object loader. These two examples show how to build a simple syntax for accessing global constant values like the text resources in the Best Practices Project more easily by just using two commands within your template:

<%% InitializeFromPage(A8EE657A1A8446CF90437A74B5CFEC6D) %%><div id="header" role="banner">
<!IoRedDotOpenPage>
<!IoRangeNoEditMode>
<%% stdLabelOpen %%>
<!/IoRangeNoEditMode>
<!IoRangeRedDotEditOnly>
<%% stdLabelClose %%>
<!/IoRangeRedDotEditOnly>

instead of using the more complex, redundant and more error-prone builtin commands like this:
<div id="header" role="banner">
<!IoRedDotOpenPage>
<!IoRangeNoEditMode>
<%!! Context:Pages.GetPage(Guid:A8EE657A1A8446CF90437A74B5CFEC6D).Elements.GetElement(stdLabelOpen).GetHtml() !!%>
<!/IoRangeNoEditMode>
<!IoRangeRedDotEditOnly>
<%!! Context:Pages.GetPage(Guid:A8EE657A1A8446CF90437A74B5CFEC6D).Elements.GetElement(stdLabelClose).GetHtml() !!%>
<!/IoRangeRedDotEditOnly>

Both examples come with full source code and compiled assembly. Read more on OTDN here.

Keine Kommentare:

Kommentar veröffentlichen