Exemplo n.º 1
0
        private async Task CreateRoomsPagesAsync(IServiceProvider serviceProvider, SeederContext context, NodeId parentId)
        {
            // Create Rooms list
            var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <SimplePage>());

            this.AddContentValue(content, nameof(ContentPage.NavigationTitle), "Rooms", "Kamers");

            var roomsPageId = await this.CreatePageAsync(serviceProvider, context, parentId, content, "Rooms", "Kamers", 0, "RoomList");

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "twin-sea-view", "Twin Sea View", "Tweepersoonskamer Zeezicht", 180, 0);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "twin-private-pool", "Twin Private Pool", "Tweepersoonskamer met Privezwembad", 220, 1);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "bungalow-garden-view", "Bungalow Garden View", "Bungalow Tuinzicht", 210, 2);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "bungalow-sea-view", "Bungalow Sea View", "Bungalow Zeezicht", 240, 3);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "bungalow-sharing-pool", "Bungalow Sharing Pool", "Bungalow met gedeeld zwembad", 260, 4);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "bungalow-family-garden-view", "Bungalow Family Garden View", "Familiebungalow Tuinzicht", 240, 5);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "bungalow-family-side-sea-view", "Bungalow Family Side Sea View", "Familiebungalow Zeezicht", 280, 6);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "maisonette-garden-view", "Maisonette Garden View", "Maisonette Tuinzicht", 250, 7);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "suite-sea-view", "Suite Sea View", "Suite Zeezicht", 320, 8);

            await this.CreateRoomPageAsync(serviceProvider, context, roomsPageId, "villa-sea-view-private-pool", "Villa Sea View Private Pool", "Villa Zeezicht met Privezwembad", 400, 9);
        }
Exemplo n.º 2
0
        private async Task CreateRoomPageAsync(IServiceProvider serviceProvider, SeederContext context, NodeId roomsPageId, string imageFolder, string englishName, string dutchName, int nightlyRate, int sortIndex)
        {
            var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <RoomDetail>());
            var images  = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), $"../seed-assets/rooms/{imageFolder}".ToSafeFilePath()));

            var mainImageId = await CreateImageAsync(serviceProvider, context, images.First(), $"{englishName} Image 1");

            this.AddContentValue(content, nameof(RoomDetail.MainImage), NodeReference.New(mainImageId));

            for (var i = 1; i < images.Length; i++)
            {
                var additionalImageId = await CreateImageAsync(serviceProvider, context, images[i], $"{englishName} Image {i + 1}");

                this.AddContentValue(content, nameof(RoomDetail.AdditionalImages), NodeReference.New(additionalImageId));
            }

            this.AddContentValue(content, nameof(RoomDetail.NightlyRate), nightlyRate);
            this.AddContentValue(content, nameof(RoomDetail.DiscountedFrom), new Random().Next(nightlyRate, Convert.ToInt32(nightlyRate * 1.2)));
            this.AddContentValue(content, nameof(RoomDetail.ListDescription), Lorem.Sentence(8, 14), Lorem.Sentence(8, 14));
            this.AddContentValue(content, nameof(RoomDetail.LongDescription), "<p>" + string.Join("</p><p>", Lorem.Paragraphs(6, 16, 5, 10, 3)) + "</p>", "<p>" + string.Join("</p><p>", Lorem.Paragraphs(6, 16, 5, 10, 3)) + "</p>");

            var roomPage = await this.CreatePageAsync(serviceProvider, context, roomsPageId, content, englishName, dutchName, sortIndex);

            context.Rooms.Add(roomPage);
        }
Exemplo n.º 3
0
        private async Task CreateBlogPagesAsync(IServiceProvider serviceProvider, SeederContext context, NodeId parentId)
        {
            // Create Blog overview
            var blogContent = EmbeddedContent.New(ContentTypeDefinition.Lookup <SimplePage>());

            this.AddContentValue(blogContent, nameof(ContentPage.NavigationTitle), "Blog", "Blog");

            context.BlogParentId = await this.CreatePageAsync(serviceProvider, context, parentId, blogContent, "Blog", "Blog", 4, "BlogOverview");

            var articleDate = DateTime.Today.AddDays(-_rnd.Next(0, 7));
            var imageFiles  = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), $"../seed-assets/blog".ToSafeFilePath()));
            var sortIndex   = 0;

            foreach (var imageFile in imageFiles)
            {
                var imageId = await CreateImageAsync(serviceProvider, context, imageFile, $"Blog Article Image {articleDate.ToShortDateString()}");

                var categories = Path.GetFileNameWithoutExtension(imageFile).Split('-').Skip(1);

                var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <BlogArticle>());
                this.AddContentValue(content, nameof(BlogArticle.Image), NodeReference.New(imageId));
                this.AddContentValues(content, nameof(BlogArticle.Categories), categories);
                this.AddContentValue(content, nameof(BlogArticle.PublicationDate), articleDate);
                this.AddContentValue(content, nameof(BlogArticle.Author), Lorem.Words(2, 3));
                this.AddContentValue(content, nameof(BlogArticle.ListDescription), Lorem.Sentence(8, 14), Lorem.Sentence(8, 14));
                this.AddContentValue(content, nameof(BlogArticle.Body), "<p>" + string.Join("</p><p>", Lorem.Paragraphs(6, 16, 5, 10, 3)) + "</p>", "<p>" + string.Join("</p><p>", Lorem.Paragraphs(6, 16, 5, 10, 3)) + "</p>");

                await this.CreatePageAsync(serviceProvider, context, context.BlogParentId, content, Lorem.Words(4, 8), Lorem.Words(4, 8), sortIndex ++);

                articleDate = articleDate.AddDays(-_rnd.Next(0, 7));
            }
        }
Exemplo n.º 4
0
        private async Task <string> CreateImageAsync(IServiceProvider serviceProvider, SeederContext context, string imageFile, string nodeName)
        {
            var fileService    = serviceProvider.GetRequiredService <IFileService>();
            var commandBus     = serviceProvider.GetRequiredService <ICommandBus>();
            var contentService = serviceProvider.GetRequiredService <IContentService>();

            var fileId = FileDescriptorId.New;

            await using (var fileStream = File.OpenRead(imageFile))
            {
                await commandBus.PublishAsync(new CreateFile(fileId, fileStream, Path.GetFileName(imageFile), "image/jpeg"));
            }

            var contentType = ContentTypeDefinition.Lookup <Image>();
            var content     = EmbeddedContent.New(contentType);

            this.AddContentValue(content, nameof(Image.File), new MediaFile(fileId));

            // Events
            var nodeId    = NodeId.New;
            var versionId = NodeVersionId.New;
            var contentId = await contentService.CreateContentAsync(contentType, content).NoSync();

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.CreateNode(nodeId, contentType, nodeName, context.ImagesFolderId, 0));

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.AddNodeVersion(nodeId, versionId, contentId, "Version 1", NodeVersionStateKey.New));

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.PublishNode(nodeId, _englishCulture, versionId, null));

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.PublishNode(nodeId, _dutchCulture, versionId, null));

            context.AllImages.Add(nodeId);

            return(nodeId);
        }
Exemplo n.º 5
0
        private async Task CreateFacilitiesPagesAsync(IServiceProvider serviceProvider, SeederContext context, NodeId parentId)
        {
            // Create Facilities list
            var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <SimplePage>());

            this.AddContentValue(content, nameof(ContentPage.NavigationTitle), "Facilities", "Faciliteiten");

            var facilitiesPage = await this.CreatePageAsync(serviceProvider, context, parentId, content, "Facilities", "Faciliteiten", 2, "FacilitiesList");

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "buffet-restaurants", "Buffet Restaurants", "Buffetten", 0);

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "private-dining", "A-la-carte & Private Dining", "A-la-carte & Prive Dineren", 1);

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "skybar-lounge", "Bars & Lounges", "Bars & Lounges", 2);

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "spa-wellness", "Spa & Beauty Center", "Spa & Wellness", 3);

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "pools-waterpark", "Pools & Waterpark", "Zwembaden & Waterpark", 4);

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "games-recreation", "Games & Recreation", "Spel & Ontspanning", 5);

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "sport-fitness", "Sport & Fitness", "Sport & Fitness", 6);

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "conference-events", "Conference & Events", "Conferentie & Evenementen", 7);

            await this.CreateFacilityPageAsync(serviceProvider, context, facilitiesPage, "wedding", "Wedding Venue", "Trouwlocatie", 8);
        }
Exemplo n.º 6
0
        private async Task CreateStaffMemberAsync(IServiceProvider serviceProvider, SeederContext context, int imageNumber, string name, string roleEnglish, string roleDutch)
        {
            var commandBus     = serviceProvider.GetRequiredService <ICommandBus>();
            var contentService = serviceProvider.GetRequiredService <IContentService>();

            var fileId = FileDescriptorId.New;

            await using (var fileStream = File.OpenRead(Path.Combine(Directory.GetCurrentDirectory(), @$ "../seed-assets/staff/staff-{imageNumber}.jpg".ToSafeFilePath())))
            {
                await commandBus.PublishAsync(new CreateFile(fileId, fileStream, $"staff-{imageNumber}.jpg", "image/jpeg"));
            }

            var contentType = ContentTypeDefinition.Lookup <StaffMember>();
            var content     = EmbeddedContent.New(contentType);

            this.AddContentValue(content, nameof(StaffMember.Picture), new MediaFile(fileId));
            this.AddContentValue(content, nameof(StaffMember.Name), name);
            this.AddContentValue(content, nameof(StaffMember.Role), roleEnglish, roleDutch);

            // Events
            var nodeId    = NodeId.New;
            var versionId = NodeVersionId.New;

            var contentId = await contentService.CreateContentAsync(contentType, content).NoSync();

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.CreateNode(nodeId, contentType, name, context.StaffMembersFolderId, 0));

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.AddNodeVersion(nodeId, versionId, contentId, "Version 1", NodeVersionStateKey.New));

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.PublishNode(nodeId, _englishCulture, versionId, null));

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.PublishNode(nodeId, _dutchCulture, versionId, null));
        }
Exemplo n.º 7
0
        private async Task CreatePagesAsync(IServiceProvider serviceProvider, SeederContext context)
        {
            var homepageId = await this.CreateHomepageAsync(serviceProvider, context);

            // Rooms & Suites
            await this.CreateRoomsPagesAsync(serviceProvider, context, homepageId);

            // The Hotel
            var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <ContentPage>());

            this.AddContentValue(content, nameof(ContentPage.NavigationTitle), "The Hotel", "Het Hotel");
            await this.CreatePageAsync(serviceProvider, context, homepageId, content, "The Hotel", "Het Hotel", 1);

            // Facilities
            await this.CreateFacilitiesPagesAsync(serviceProvider, context, homepageId);

            // Booking
            content = EmbeddedContent.New(ContentTypeDefinition.Lookup <BookingPage>());
            this.AddContentValue(content, nameof(ContentPage.NavigationTitle), "Bookings", "Reserveringen");
            this.AddContentValue(content, nameof(ContentPage.HideInNavigation), true);
            await this.CreatePageAsync(serviceProvider, context, homepageId, content, "Bookings", "Reserveringen", 3);

            // Blog
            await this.CreateBlogPagesAsync(serviceProvider, context, homepageId);

            // Contact
            content = EmbeddedContent.New(ContentTypeDefinition.Lookup <ContactPage>());
            await this.CreatePageAsync(serviceProvider, context, homepageId, content, "Contact", "Contact", 5);

            // Homepage content
            await this.AddHomepageContentAsync(serviceProvider, context, homepageId);
        }
Exemplo n.º 8
0
        // Modules
        private EmbeddedContent CreateFacilitiesModule(IServiceProvider serviceProvider, SeederContext context)
        {
            var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <FacilitiesGrid>());

            foreach (var facilitiesPageId in context.Facilities.Take(9))
            {
                this.AddContentValue(content, nameof(FacilitiesGrid.Facilities), new Link {
                    PageId = facilitiesPageId
                });
            }

            return(content);
        }
Exemplo n.º 9
0
        // Modules
        private EmbeddedContent CreateRoomCarouselModule(IServiceProvider serviceProvider, SeederContext context)
        {
            var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <RoomCarousel>());

            foreach (var roomPageId in context.Rooms.Take(6))
            {
                this.AddContentValue(content, nameof(RoomCarousel.Rooms), new Link {
                    PageId = roomPageId
                });
            }

            return(content);
        }
Exemplo n.º 10
0
        private async Task <EmbeddedContent> CreateOffersModuleAsync(IServiceProvider serviceProvider, SeederContext context)
        {
            var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <OffersMosaic>());

            foreach (var imageFile in Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), $"../seed-assets/offers".ToSafeFilePath())))
            {
                var imageId = await CreateImageAsync(serviceProvider, context, imageFile, "Offer");

                var offer = EmbeddedContent.New(ContentTypeDefinition.Lookup <OfferItem>());

                this.AddContentValue(offer, nameof(OfferItem.Image), NodeReference.New(imageId));
                this.AddContentValue(offer, nameof(OfferItem.Title), Lorem.Words(3, 6), Lorem.Words(3, 6));
                this.AddContentValue(offer, nameof(OfferItem.Text), Lorem.Paragraph(5, 8, 2, 4), Lorem.Paragraph(5, 8, 2, 4));

                this.AddContentValue(content, nameof(OffersMosaic.Offers), offer);
            }

            return(content);
        }
Exemplo n.º 11
0
        public void Start()
        {
            // Disable debug display from HttpServer
            _ws.SetDebug = false;

            // Register assemblies for content and refresh file list
            ((EmbeddedContent)_ws.HttpRootManager.GetSource("EmbeddedContent")).RegisterAssembly(this.GetType()); // Register it in specific source
            EmbeddedContent.RegisterAssembly(_ws, _wh.GetType());                                                 // Register it in all sources of matching type (helper method specific to this source)
            _ws.HttpRootManager.ReloadSourceFileList();                                                           // Reload all file lists in all sources

            // IP Filtering
            _ws.IPFilterEnabled = false;  // Change this to true to enable IP filter!
            _ws.IPFilter.AddBlackList(new IPAddress(new byte[] { 192, 168, 1, 64 }), 24);
            _ws.IPFilter.AddWhiteList(new IPAddress(new byte[] { 192, 168, 2, 64 }), 32);

            // User Authentication
            _ws.AuthenticationRequired = true;
            _ws.UserManager.AddUser("user", "password");

            // JSON
            _ws.AddPath("/data.json", _json.Listen);

            // Server root path for static content
            _ws.HttpRootManager.SetRootPath("PublicHtml");
            _ws.HttpRootManager.SetIndex(new string[] { "/index.html" });
            _ws.HttpRootManager.AddExtension("chtml", new DotLiquidCoreTemplate());
            _ws.HttpRootManager.AddExtension("shtml", new SimpleTemplate());

            // Initialize demos
            _cookieDemo.Start(_ws);
            _sessionDemo.Start(_ws);
            _LEDDemo.Start(_ws, _json, _template);
            _redirectDemo.Start(_ws);
            _temperatureDemo.Start(_ws);
            _timerDemo.Start(_ws, _json, _template);
            _templateDemo.Start(_ws, _template);
            _liquidDemo.Start(_ws);

            // Start server on default port (8000)
            //_ws.Start();
            _ws.Start("80");
        }
Exemplo n.º 12
0
        private async Task CreateFacilityPageAsync(IServiceProvider serviceProvider, SeederContext context, NodeId facilitiesParentId, string imageFolder, string englishName, string dutchName, int sortOrder)
        {
            var content = EmbeddedContent.New(ContentTypeDefinition.Lookup <FacilityPage>());
            var images  = Directory.GetFiles(Path.Combine(Directory.GetCurrentDirectory(), $"../seed-assets/facilities/{imageFolder}".ToSafeFilePath()));

            var imageAssets = new List <string>();

            for (var i = 0; i < images.Length; i++)
            {
                var imageId = await CreateImageAsync(serviceProvider, context, images[i], $"{englishName} Image {i + 1}");

                this.AddContentValue(content, nameof(FacilityPage.Images), NodeReference.New(imageId));
                imageAssets.Add(imageId);
            }

            this.AddContentValue(content, nameof(FacilityPage.ListDescription), Lorem.Sentence(8, 14), Lorem.Sentence(8, 14));

            var facilityPageId = await this.CreatePageAsync(serviceProvider, context, facilitiesParentId, content, englishName, dutchName, sortOrder);

            context.Facilities.Add(facilityPageId);
        }
 private static Tuple<string, List<Category>, List<MediaContent>> getEmbeddedContentTuple(EmbeddedContent embedded)
 {
     List<MediaContent> mediaContents = new List<MediaContent>();
     return new Tuple<string, List<Category>, List<MediaContent>>(embedded.RelativeLocation,
         embedded.Categories != null ? embedded.Categories.CollectionContent : new List<Category>(),
         mediaContents);
 }
Exemplo n.º 14
0
 internal static void Update_EmbeddedContent_Locations(EmbeddedContent embeddedContent, AddressAndLocationCollection localCollection, AddressAndLocationCollection masterCollection)
 {
     // TODO: Remove objects, that are no longer available in master
 }
Exemplo n.º 15
0
 internal static void Update_EmbeddedContent_Categories(EmbeddedContent embeddedContent, CategoryCollection localCollection, CategoryCollection masterCollection)
 {
     // TODO: Remove objects, that are no longer available in master
 }
Exemplo n.º 16
0
 internal static RenderedNode getNodeFromEmbeddedContent(EmbeddedContent embeddedContent)
 {
     RenderedNode node = RenderedNode.CreateDefault();
     node.TechnicalSource = NodeSourceTypeEmbeddedContent;
     node.Title = embeddedContent.Title;
     node.Excerpt = embeddedContent.Description;
     node.ActualContentUrl = embeddedContent.IFrameTagContents;
     if (embeddedContent.Categories != null)
     {
         node.Categories.CollectionContent.AddRange(getCategoryCollectionTexts(embeddedContent.Categories, getTitleOrNameFromCategory));
         node.CategoryNames.CollectionContent.AddRange(getCategoryCollectionTexts(embeddedContent.Categories, cat => cat.CategoryName));
         node.CategoryIDList = embeddedContent.Categories.SelectedIDCommaSeparated;
     }
     if (embeddedContent.Locations != null)
         node.Locations.CollectionContent.AddRange(getLocationCollectionTexts(embeddedContent.Locations));
     return node;
 }
Exemplo n.º 17
0
 private static CloudBlob processEmbeddedContent(EmbeddedContent embedded, string targetContentRootLocation, Dictionary<string, string> categoryMap, CategoryCollection targetCategoryCollection, string processID)
 {
     var owner = InformationContext.CurrentOwner;
     var sourceCategories = embedded.Categories;
     var targetItemCategories = GetTargetItemCategories(sourceCategories, targetCategoryCollection, categoryMap);
     embedded.Categories = targetItemCategories;
     embedded.RelativeLocation = StorageSupport.GetOwnerContentLocation(owner,
                                                                           string.Format("{0}AaltoGlobalImpact.OIP/EmbeddedContent/{1}", targetContentRootLocation, embedded.ID));
     embedded.GeneratedByProcessID = processID;
     if (embedded.Locations != null)
         embedded.Locations.CollectionContent.ForEach(location => location.FixCurrentOwnerLocation());
     var storedBlob = embedded.StoreInformationMasterFirst(owner, true, overwriteIfExists: true);
     return storedBlob;
 }
Exemplo n.º 18
0
        private async Task AddHomepageContentAsync(IServiceProvider serviceProvider, SeederContext context, NodeId homepageId)
        {
            var commandBus     = serviceProvider.GetRequiredService <ICommandBus>();
            var contentService = serviceProvider.GetRequiredService <IContentService>();

            var contentType = ContentTypeDefinition.Lookup <Homepage>();
            var content     = EmbeddedContent.New(contentType);

            this.AddContentValue(content, nameof(Homepage.PageTitle), "Welcome", "Welkom");
            this.AddContentValue(content, nameof(Homepage.NavigationTitle), "Home", "Home");

            // Header slider items
            var sliderContentType = ContentTypeDefinition.Lookup <SliderItem>();

            var sliderContent1 = EmbeddedContent.New(sliderContentType);
            var sliderImageId  = await CreateImageAsync(serviceProvider, context, Path.Combine(Directory.GetCurrentDirectory(), @"../seed-assets/hotel/slider-item-1.jpg".ToSafeFilePath()), "Slider Image 1");

            this.AddContentValue(sliderContent1, nameof(SliderItem.BackgroundImage), NodeReference.New(sliderImageId));
            this.AddContentValue(sliderContent1, nameof(SliderItem.Caption), "Welcome to The Redakt Hotel and Resort", "Welkom bij het Redakt Hotel en Resort");
            this.AddContentValue(sliderContent1, nameof(SliderItem.Title), "Experience the Luxury", "Ervaar de Luxe");
            this.AddContentValue(sliderContent1, nameof(SliderItem.Subtitle), "in our Hotel", "in ons Hotel");
            this.AddContentValue(content, nameof(Homepage.SliderItems), sliderContent1);

            var sliderContent2 = EmbeddedContent.New(sliderContentType);

            this.AddContentValue(sliderContent2, nameof(SliderItem.BackgroundImage), NodeReference.New(sliderImageId));
            this.AddContentValue(sliderContent2, nameof(SliderItem.Caption), "Welcome to The Redakt Hotel and Resort", "Welkom bij het Redakt Hotel en Resort");
            this.AddContentValue(sliderContent2, nameof(SliderItem.Title), "Experience Exceptional Dining", "Ervaar Uitzonderlijk Dineren");
            this.AddContentValue(sliderContent2, nameof(SliderItem.Subtitle), "in our Restaurants", "in onze Restaurants");
            this.AddContentValue(content, nameof(Homepage.SliderItems), sliderContent2);

            var sliderContent3 = EmbeddedContent.New(sliderContentType);

            this.AddContentValue(sliderContent3, nameof(SliderItem.BackgroundImage), NodeReference.New(sliderImageId));
            this.AddContentValue(sliderContent3, nameof(SliderItem.Caption), "Welcome to The Redakt Hotel and Resort", "Welkom bij het Redakt Hotel en Resort");
            this.AddContentValue(sliderContent3, nameof(SliderItem.Title), "Experience Ultimate Relaxation", "Ervaar Ultieme Ontspanning");
            this.AddContentValue(sliderContent3, nameof(SliderItem.Subtitle), "in our Spa & Wellness", "in onze Spa & Wellness");
            this.AddContentValue(content, nameof(Homepage.SliderItems), sliderContent3);

            // Room carousel
            this.AddContentValue(content, nameof(Homepage.Modules), this.CreateRoomCarouselModule(serviceProvider, context));

            // Text content
            var textContent = EmbeddedContent.New(ContentTypeDefinition.Lookup <TextWithImage>());
            var imageId     = await CreateImageAsync(serviceProvider, context, Path.Combine(Directory.GetCurrentDirectory(), @"../seed-assets/home/home-text-image.jpg".ToSafeFilePath()), "Homepage Image");

            this.AddContentValue(textContent, nameof(TextWithImage.Image), NodeReference.New(imageId));
            this.AddContentValue(textContent, nameof(TextWithImage.HeadingCaption), "Welcome to The Redakt", "Welkom bij The Redakt");
            this.AddContentValue(textContent, nameof(TextWithImage.Heading), "Demonstration website", "Demonstratie website");
            this.AddContentValue(textContent, nameof(TextWithImage.BodyText), "The Redakt Hotel & Resort is a demo website for the <a href=\"https://www.redaktcms.com\" target=\"_blank\">Redakt Content Management System</a>. Therefore most content is fictional and automatically generated. You can visit the back office application at <a href=\"/redakt\">/redakt</a>. In the back office and application code you can play with many of the features that are part of the Redakt system. Please note, as this website is meant as a showcase for Redakt CMS only, and it does not necessarily reflect best web software development practices. Parts of the website may be functionally incomplete or missing.", "The Redakt Hotel & Resort is een demo website voor het <a href=\"https://www.redaktcms.com\" target=\"_blank\">Redakt Content Management System</a>. Om deze reden is de meeste content fictioneel en automatisch gegenereerd. Je kan de back office applicatie bezoeken op <a href=\"/redakt\">/redakt</a>. In the back office en applicatie code kan je veel van de functionaliteiten uitproberen die onderdeel maken van het Redakt systeem. Let wel, aangezien deze website alleen bedoeld is als showcase voor Redakt CMS, is het niet per se een goed voorbeeld van web software ontwikkeling. Sommige onderdelen van de website kunnen functioneel incompleet zijn.");
            this.AddContentValue(content, nameof(Homepage.Modules), textContent);

            // Facilities grid
            var facilitiesContent = this.CreateFacilitiesModule(serviceProvider, context);

            this.AddContentValue(facilitiesContent, nameof(FacilitiesGrid.HeadingCaption), "Our Facilities", "Onze Faciliteiten");
            this.AddContentValue(facilitiesContent, nameof(FacilitiesGrid.Heading), "Explore The Redakt", "Ontdek The Redakt");
            this.AddContentValue(facilitiesContent, nameof(FacilitiesGrid.IntroText), Lorem.Paragraph(5, 10, 4, 8), Lorem.Paragraph(5, 10, 4, 8));
            this.AddContentValue(content, nameof(Homepage.Modules), facilitiesContent);

            // Offers mosaic
            var offersContent = await this.CreateOffersModuleAsync(serviceProvider, context);

            this.AddContentValue(offersContent, nameof(OffersMosaic.HeadingCaption), "Our Offers", "Onze Aanbiedingen");
            this.AddContentValue(offersContent, nameof(OffersMosaic.Heading), "The Redakt Special Offers", "The Redakt Speciale Aanbiedingen");
            this.AddContentValue(offersContent, nameof(OffersMosaic.IntroText), Lorem.Paragraph(5, 10, 4, 8), Lorem.Paragraph(5, 10, 4, 8));
            this.AddContentValue(content, nameof(Homepage.Modules), offersContent);

            // Latest Blog Articles
            var blogContent = EmbeddedContent.New(ContentTypeDefinition.Lookup <LatestBlogArticles>());

            this.AddContentValue(blogContent, nameof(LatestBlogArticles.Parent), new Link {
                PageId = context.BlogParentId
            });
            this.AddContentValue(blogContent, nameof(LatestBlogArticles.HeadingCaption), "The Redakt Blog", "Het Blog");
            this.AddContentValue(blogContent, nameof(LatestBlogArticles.Heading), "Latest News", "Laatste Nieuw");
            this.AddContentValue(blogContent, nameof(LatestBlogArticles.IntroText), Lorem.Paragraph(5, 10, 4, 8), Lorem.Paragraph(5, 10, 4, 8));
            this.AddContentValue(content, nameof(Homepage.Modules), blogContent);

            var versionId = NodeVersionId.New;
            var contentId = await contentService.CreateContentAsync(contentType, content).NoSync();

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.AddNodeVersion(homepageId, versionId, contentId, "Version 1", NodeVersionStateKey.New));

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.PublishNode(homepageId, _englishCulture, versionId, null));

            await commandBus.PublishAsync(new Redakt.ContentManagement.Nodes.Commands.PublishNode(homepageId, _dutchCulture, versionId, null));
        }