Blocks are not rendering in TinyMCE Editor CMS 7.5


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"

Jun 03, 2015 11:49

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)

Jun 03, 2015 12:11

I render the property like <%=CurrentBlock.Title%>. I'm working on WebForms.

Edited, Jun 03, 2015 12:21
<p>Change it to &lt;episerver:property propertyname="Title" runat="server" /&gt; and see if it works. There might be some helper-method so you can render it by &lt;%= CurrentBlock.Title.ToHtmlString() %&gt; or similar.</p>
Jun 03, 2015 12:43

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">
                <div class="block-header">
                    @if (!string.IsNullOrEmpty(Model.Subtitle))
                        <span class="sub-title">@Model.Subtitle</span>
            <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">

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?

Edited, Jun 03, 2015 13:14
<p><img src="file:///C:/Users/Administrator/Desktop/TestImage.png" alt="" />For Example,&nbsp;</p> <p>&lt;div&gt;</p> <p>&lt;b&gt;&lt;/b&gt;<br /> &lt;div class="inputcontainer"&gt;<br /> &lt;asp:TextBox ID="txt" runat="server"&gt;&lt;/asp:TextBox&gt;&amp;nbsp;<br /> &lt;asp:Button ID="btnGo" runat="server" OnClick="btnGo_Click" Text="Go" /&gt;<br /> &lt;/div&gt;<br />&lt;/div&gt;</p> <p></p> <p>but when i view the Page. Only block name shows. like, I have create block with name Test. &amp; on pgae "Test" Shows.</p>
Jun 03, 2015 13:38

Shan, if you cannot use the episerver:property-tag, then you might need to do something like this: 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.

Jun 03, 2015 14:01
<p>Thanks Erik for your quick responce :-)</p>
Jun 03, 2015 14:26
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.