I have creating my website using composite c1 .net cms with razor master template. but I can't able to render the script in the masterlayout.Here is my razor files.
1.MaserLayout.cshtml
@inherits CompositeC1WebPage
@{
string websiteTitle = HomePageNode.Title;
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" class="no-js" lang="@Lang">
<head>
<title>@CurrentPageNode.Title</title>
@if (!string.IsNullOrEmpty(CurrentPageNode.Description))
{
<meta name="description" content="@CurrentPageNode.Description" />
}
@PageTemplateFeature("Descriptive HTML head elements")
</head>
<body>
<div class="container-fluid main-container">
@* renders the sub template: *@
@RenderBody()
</div>
</body>
</html>
above is my master template and here is my home template
@inherits RazorPageTemplate
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@*you can add template specific head elements here*@
</head>
<body class="frontpage">
<div>Test template</div>
<script>
$(document).ready(function () {
$('.test').click(function () {
alert("test");
})
});
</script>
</body>
</html>
But I can't able to run the script in the masterpage.Cn anyone help.
Thanks in advance for help.