Copied to clipboard

Flag this post as spam?

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


  • richard coates 7 posts 87 karma points
    Feb 26, 2018 @ 18:42
    richard coates
    0

    Entered text not showing on page

    Hi,

    I have an already created site that I want to add content to but its not working as I expected.

    I have done the following:

    1. Create a document type called myDocType
    2. Added a tab to it named Body
    3. Added a Rich Text Editor to it
    4. In Document templates I have edited it so that it points to the master page
    5. I have then added the document template to the site under the content section. Using create an item under the place in the tree I want it.

    I then added some sample text using the text editor.

    Nothing appears??? I can see the master layout but the text I entered in the Rich Text Editor is not there.

    I presume it has something to do with the Template code as it just has the Layout = "Master.cshtml"; code within it.

    As I added a text editor and have added text shouldnt this show up? Any help you can offer is greatly appreciated.

  • Daniel Chenery 119 posts 464 karma points
    Feb 26, 2018 @ 22:49
    Daniel Chenery
    0

    Have you rendered the property in the template at all?

    E.G. Html.Raw(Model.Content.GetPropertyValue<string>("bodyText"))

  • richard coates 7 posts 87 karma points
    Feb 27, 2018 @ 08:18
    richard coates
    0

    No I havent as I thought it would pick it up automatically. I will have a go.

  • Daniel Chenery 119 posts 464 karma points
    Feb 27, 2018 @ 09:26
    Daniel Chenery
    0

    Nope. One of the many beauties of Umbraco is you can render things anywhere you like (as many times as you like if needed!) It doesn't place anything on the site without you telling it to render there.

    Let me know if it works for you :)

Please Sign in or register to post replies

Write your reply to:

Draft