Copied to clipboard

Flag this post as spam?

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


  • Saied 349 posts 674 karma points
    Aug 18, 2016 @ 13:59
    Saied
    0

    Best way to store razor/html in properties?

    This question is sort of 2 parts:

    1. I have 3 websites, they all have the same look they just differ a bit and they have different analytics and some other things. Currently I have a template for each website, but this is cumbersome. I was thinking of putting the different parts of each website into each partials and then having a single template that they all share that usings the _Layout = "Master.cshtml" for example. Is this the correct approach or a viable one?

    2. If I have properties that require html, what is the best way to create properties for these (should I use a RichTextEditor or something else? Basically I am trying to slim down the amount of views in the project.

    Thanks, Saied

  • Dennis Adolfi 1072 posts 6378 karma points MVP 2x c-trib
    Aug 18, 2016 @ 14:51
    Dennis Adolfi
    0

    Hi Saied.

    1. To me this sounds about right, to have all three sites sharing the same template/master, and then based on specific site settings render different partials.

    2. I personally don't like putting html code in the RTE, since it always tries to "clean-up" my code. Have you checked out the built in data type "Markdown Editor"?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies