Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jurgen Wiersema 5 posts 75 karma points
    Feb 06, 2017 @ 13:47
    Jurgen Wiersema
    0

    Partial view macro inside Rich text editor not showing correct html

    I'm using Umbraco version 7.5.8 assembly: 1.0.6233.15010.

    I've created my own partial view macros that simply output html. They show correctly in the edit screen. But in the front-end the html is not updating to the right html. I've already tried to re-add the partial view macro, added a line-break underneath the macro in the RTE and republished the entire site. Also, I have not enabled caching. Still the correct html is not showing. What is the real secret of working with partial view macros in the grid??

    macro:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @using JW.Umbraco.Second.Extensions
    
    <div id="standard-tiles"></div>
    
    <input class="scriptsinput" type="text" value="/scripts/SubscribedSkus.js" />
    

    The input field is not shown (shows in the edit screen of the umbraco page)

  • Jurgen Wiersema 5 posts 75 karma points
    Feb 06, 2017 @ 18:08
    Jurgen Wiersema
    0

    It works if you use a div instead of an input element. Clearly I do not understand why that matters. Anyone care to explain? Does the partial view macro have a pre-defined set of allowed controls?

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    
        <div class="partialviewmacro">
            <div class="ms-font-su ms-fontColor-white" id="userNameContainer">
                <h2 id="userName">Loading..</h2><div id="userProfilePictureHolder"><i class="ms-Icon ms-Icon--person"></i></div>
            </div>
            <div class="scriptsinput">/scripts/GraphProfile.js</div>
        </div>
    
Please Sign in or register to post replies

Write your reply to:

Draft