0
votes

Following the Umbraco Tutorial , I have installed an empty website, then used the Modernizr template as advised. I got the same result as tutorial, then I wanted to go ahead and make some other changes such as modifying the website name, since the template shows the current page name instead of The Website name.

(please look at the h1.title item in the below image)

umbraco 7.3.1 empty using Modernizr template

What I have done:

In the HomePage under the Document Type node, I have added a new tab that I named: "Site Config Data", then added to it a new property: "websiteName", then in the Master page template header I inserted the same property field with the recursive option checked, so now it looks like the next:

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>@Umbraco.Field("websiteName", recursive: true)</title>

    <meta name="description" content="">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link rel="stylesheet" href="/css/style.css">
    <script src="/scripts/libs/modernizr-2.0.6.min.js"></script>
</head>

Then in the Home page under the Content node, I entered the required website name in the newly added Textbox, then saved and published successfully.

But when I browse to the home page and click on the menu bar options, still the current page shows instead of the website name.

I googled on this issue, but could find nothing, any ideas please ?

1

1 Answers

0
votes

A stupid error, the property in the Master template was in the wrong place, it should be in the body tag not in the head tag as shown above in the code block. Now as I changed it, the website name shows normally in the right place.