accele
01/09/2024, 5:33 PMSebastiaan
01/09/2024, 6:56 PMhtml
<html lang="en"><head><script src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/libs/extend-native-history-api.js"></script></head><body><header>
<script src="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.js
"></script>
<link rel="stylesheet" href="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.css
">
</header>
Not sure what your question is? What does your master template look like and what does the template for your document type look like?accele
01/09/2024, 7:11 PMhtml
@using Umbraco.Cms.Web.Common.PublishedModels;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<header>
<script src="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.js
"></script>
<link href="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.css
" rel="stylesheet">
</header>
<body>
@RenderBody()
</body>
<footer>
@RenderSection("BhajanViewScripts", required: false);
<script>
const swiper = new Swiper('.swiper', {
// Optional parameters
direction: 'horizontal',
loop: true,
slidesPerView: 3,
// If we need pagination
pagination: {
el: '.swiper-pagination',
},
// Navigation arrows
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
// And if we need scrollbar
scrollbar: {
el: '.swiper-scrollbar',
},
});
</script>
</footer>
</html>
Sebastiaan
01/09/2024, 7:12 PMaccele
01/09/2024, 7:14 PMSebastiaan
01/09/2024, 7:15 PMSebastiaan
01/09/2024, 7:16 PMhtml
after the first 3 backticks:
https://cdn.discordapp.com/attachments/1194333106509975664/1194358996296007780/image.png?ex=65b0107e&is=659d9b7e&hm=3cc1ef61036fa95d615b1f22c9399b6159b812e125748b3013ddd75e56ce62c9&accele
01/09/2024, 7:17 PMSebastiaan
01/09/2024, 7:18 PMaccele
01/09/2024, 7:19 PMaccele
01/09/2024, 7:19 PMaccele
01/09/2024, 7:20 PMhtml
<html lang="en"><head><script src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/libs/extend-native-history-api.js"></script></head><body><header>
<script src="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.js
"></script>
<link rel="stylesheet" href="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.css
">
</header>
<h1>Atma Bhog :)</h1>
<div class="umb-block-list">
<h2 style="padding: 20px">TEST</h2>
<div style="padding: 20px">
<h2>HI TEST RTE</h2>
</div>
<div class="AllDeitiesPartial">
<div class="swiper swiper-initialized swiper-horizontal swiper-backface-hidden">
<p>Bhajans of All Deities Partial</p>
<p>Deity Folder Id: 1088</p>
Sebastiaan
01/09/2024, 7:21 PMLayout = "Master.cshtml";
It will take anything in Master.cshtml
and at the place it says @RenderBody()
it will put the exact html from your template.
So imagine this `Master.html`:
html
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head></head>
<body>
@RenderBody()
</body>
</html>
And your template is, for example `TextPage.cshtml`:
html
@{
Layout = "Master.cshtml";
}
<h1>Hello World!</h1>
accele
01/09/2024, 7:21 PMSebastiaan
01/09/2024, 7:21 PMhtml
<!DOCTYPE html>
<html>
<head></head>
<body>
<h1>Hello World!
</body>
</html>
accele
01/09/2024, 7:22 PMSebastiaan
01/09/2024, 7:22 PMaccele
01/09/2024, 7:22 PMhtml
@{
Layout = "Master.cshtml";
var home = (Home)Model.Root();
var bhajans = Model.Children<Bhajan>();
}
<h1>@home.Header</h1>
accele
01/09/2024, 7:24 PMSebastiaan
01/09/2024, 7:25 PMhtml
<html lang="en"><head><script src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/libs/extend-native-history-api.js"></script></head><body><header>
accele
01/09/2024, 7:25 PMaccele
01/09/2024, 7:25 PMSebastiaan
01/09/2024, 7:26 PMhtml
@using Umbraco.Cms.Web.Common.PublishedModels;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
Layout = null;
}<!DOCTYPE html>
<html lang="en">
<header>
<script src="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.js
"></script>
<link href="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.css
" rel="stylesheet">
</header>
<body>
@RenderBody()
</body>
<footer>
@RenderSection("BhajanViewScripts", required: false);
<script>
const swiper = new Swiper('.swiper', {
// Optional parameters
direction: 'horizontal',
loop: true,
slidesPerView: 3,
// If we need pagination
pagination: {
el: '.swiper-pagination',
},
// Navigation arrows
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
// And if we need scrollbar
scrollbar: {
el: '.swiper-scrollbar',
},
});
</script>
</footer>
</html>
Sebastiaan
01/09/2024, 7:26 PMhtml
@{
Layout = null;
}<!DOCTYPE html>
Sebastiaan
01/09/2024, 7:27 PMaccele
01/09/2024, 7:28 PMhtml
<html lang="en"><head><script src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/libs/extend-native-history-api.js"></script></head><body><header>
<script src="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.js
"></script>
<link rel="stylesheet" href="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.css
">
</header>
<h1>Atma Bhog :)</h1>
<div class="umb-block-list">
Sebastiaan
01/09/2024, 7:30 PMSebastiaan
01/09/2024, 7:30 PMaccele
01/09/2024, 7:31 PMSebastiaan
01/09/2024, 7:32 PMhtml
<script src="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.js
"></script>
<link href="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.css
" rel="stylesheet">
accele
01/09/2024, 7:32 PMaccele
01/09/2024, 7:33 PMSebastiaan
01/09/2024, 7:33 PMaccele
01/09/2024, 7:33 PMaccele
01/09/2024, 7:34 PMSebastiaan
01/09/2024, 7:36 PMaccele
01/09/2024, 7:38 PMSebastiaan
01/09/2024, 7:38 PMhtml
@{
Layout = null;
}<!DOCTYPE html>
<html>
<head></head>
<body>
@RenderBody()
</body>
</html>
accele
01/09/2024, 7:41 PMhtml
<html lang="en"><head><script src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/libs/extend-native-history-api.js"></script></head>
<body>
<h1>Atma Bhog :)</h1>
<div class="umb-block-list">
this is the result but Ive had to exclude my scripts, trying it again with my scriptsSebastiaan
01/09/2024, 7:42 PMaccele
01/09/2024, 7:43 PMaccele
01/09/2024, 7:43 PMSebastiaan
01/09/2024, 7:43 PMaccele
01/09/2024, 7:44 PMSebastiaan
01/09/2024, 7:44 PMaccele
01/09/2024, 7:44 PMaccele
01/09/2024, 7:44 PMaccele
01/09/2024, 7:46 PMaccele
01/09/2024, 7:47 PMhtml
</head>
<body>
@RenderBody()
</body>
<footer>
accele
01/09/2024, 7:47 PMaccele
01/09/2024, 7:47 PMSebastiaan
01/09/2024, 7:47 PMSebastiaan
01/09/2024, 7:49 PMSebastiaan
01/09/2024, 7:50 PMSebastiaan
01/09/2024, 7:51 PMhtml
</body>
<footer>
This is in your Master template.. that is wrong. You can not start anything new after you've closed the body
tag.Sebastiaan
01/09/2024, 7:51 PMhtml
@using Umbraco.Cms.Web.Common.PublishedModels;
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@{
Layout = null;
}<!DOCTYPE html>
<html lang="en">
<header>
<script src="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.js
"></script>
<link href="
https://cdn.jsdelivr.net/npm/swiper@11.0.5/swiper-bundle.min.css
" rel="stylesheet">
</header>
<body>
@RenderBody()
<footer>
@RenderSection("BhajanViewScripts", required: false);
<script>
const swiper = new Swiper('.swiper', {
// Optional parameters
direction: 'horizontal',
loop: true,
slidesPerView: 3,
// If we need pagination
pagination: {
el: '.swiper-pagination',
},
// Navigation arrows
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
// And if we need scrollbar
scrollbar: {
el: '.swiper-scrollbar',
},
});
</script>
</footer>
</body>
</html>
accele
01/09/2024, 7:52 PMaccele
01/09/2024, 7:52 PMaccele
01/09/2024, 7:53 PMaccele
01/09/2024, 7:53 PMSebastiaan
01/09/2024, 7:53 PM</body>
(except for </html>
).accele
01/09/2024, 7:53 PMSebastiaan
01/09/2024, 7:54 PM