November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
How do you render your property?
If webforms you probably need <episerver:property propertyname="yourproperty" runat="server" />
If MVC you probably need @Html.PropertyFor(x=>x.CurrentPage.PropertyName) (depending on what model the view uses)
I render the property like <%=CurrentBlock.Title%>. I'm working on WebForms.
Hi , i have a similar question...
I have a contentarea where i can place blocks (AccordeonBlock for example, which contains a contentarea for AccordeonItems and those contain a tinyMcE property and 2 string properties.)
If i add Dynamic Content in the tinyMCE (for example a oEmbedPluging instance). How can i render that from within the block..
@using EPiServer.Core @using EPiServer.ServiceLocation; @using EPiServer.Web.Mvc.Html @using EPiServer.Framework.Blobs; @using EPiServer.Editor; @model AccordionBlock @{ var contentLoader = ServiceLocator.Current.GetInstance<EPiServer.IContentLoader>(); } @if( Model != null && Model.Area != null && Model.Area.Items.Any()) { <section class="block block-accordion"> <div class="container"> @if(!string.IsNullOrEmpty(Model.Title)) { <div class="block-header"> <h1>@Model.Title</h1> @if (!string.IsNullOrEmpty(Model.Subtitle)) { <span class="sub-title">@Model.Subtitle</span> } </div> } <div class="accordion-wrapper"> @if(Model != null && Model.Area != null && Model.Area.Items.Any()) { foreach (var contentItem in Model.Area.Items) { var item = contentLoader.Get<AccordionItem>(contentItem.ContentLink); <a class="toggle">@item.Title</a> <div class="content block-rte"> @item.Body </div> } } </div> </div> </section> }
As you can see i render the tinyMCE as @item.Body. The output of the plugin is then {oEmbedPlugin} .. How can i render the complete dynamic contents from within a such a block?
Shan, if you cannot use the episerver:property-tag, then you might need to do something like this: http://tedgustaf.com/sv/blogg/2009/9/parse-an-episerver-xhtml-property-with-dynamic-content/ It's and old article, but I guess it should work nowadays as well...
Vishal, I would probaly have a View for the AccordionItem and use Html.PropertyFor in that View.
I created a block & i drag & drop it into Tiny MCE Editor. But when i see the page it does not render. The name of block is appear. forexample "Test Block Name"