Copied to clipboard

Flag this post as spam?

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

  • kyle 40 posts 210 karma points
    1 day ago

    Doc type for master template

    Hi all,

    I have to make a few changes to an old Umbraco site (Umbraco v6.1.5 (Assembly version: 1.0.4993.19246)) and I'm having a hard time :(

    The footer section of the site is not editable, so my task is to utilize the CMS to make the footer editable. But how do I go about doing this? I can't have a doctype for the master template because the content will always be related to the current page... Compositions are not an option because it's not supported in v6... So I don't know what to do.

    On my Umbraco v8 website I did this in the master template.

         var rootModel = Model.Root();

    and it works 100%. But I can't seem to do this on the v6 site, I think it's because the site is based on web forms and not MVC.

    Any solution/ suggestion would be appreciated, this has been a pain for me...

    Thanks - Kyle

  • girish 5 posts 76 karma points
    1 day ago

    Hi kyle,

    You can try with the below code.

    var home = Model.Content.AncestorOrSelf(1);
    var textValue = home.GetPropertyValue<string>("value");
    <p>@textValue </p>
  • kyle 40 posts 210 karma points
    1 day ago

    Just tried it... The website breaks and gives a parse error when adding the '@'

    var home = Model.Content.AncestorOrSelf(1);
Please Sign in or register to post replies

Write your reply to: