diff --git a/.gitignore b/.gitignore index 34be221..df018f5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ Sitecore.SharedSource.DynamicSitemap.Tests/bin/ Libraries/ Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/obj/ Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/bin/ +obj/ +bin/ diff --git a/DynamicSitemapPackageDefinition.xml b/DynamicSitemapPackageDefinition.xml new file mode 100644 index 0000000..cf6f07f --- /dev/null +++ b/DynamicSitemapPackageDefinition.xml @@ -0,0 +1,342 @@ + + + + SitecoreDynamicSitemapXML + + 1.2.1 + + + + + + + + + + + True + + + + /master/sitecore/templates/Dynamic Sitemap XML/{F213021F-A6FF-4C16-B246-587F90EBC818}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/{BF5DFBF4-651F-47DF-954F-4333C73E7D6D}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency Definitions/__Standard Values/{F518E3A7-2BDE-4F63-BEF1-2F66E7424AB1}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency Definitions/{6E82C74A-5940-473B-8B60-CBB9D79EDB2D}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency For Items/{9551D9F7-A66A-4A49-A705-B0B2918C0EB5}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency For Items/Configuration/{2ABDE922-F2B7-4F65-81C3-4190B16CD29E}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency For Items/Configuration/Change Frequency/{D56C31B6-9679-4F17-A7DC-33770A8670C5}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency For Items/Configuration/Items/{3539477E-B7EA-41E1-BF01-CA72327EFB24}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency For Templates/{A1F7C913-E331-4172-BD26-0621DFBCD529}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency For Templates/Configuration/{776DFD9E-EBE7-4030-B90A-C5C9B6C862FD}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency For Templates/Configuration/Change Frequency/{317E4499-84B4-40EB-95A0-8861A5E34937}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency For Templates/Configuration/Templates/{99B430FE-FE8B-4177-BAC1-2546AB970EC7}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency Value/__Standard Values/{90AAA66C-4223-4FA5-9AC2-045974AA3123}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency Value/{5BADC027-144B-4155-A5A8-8FDC475DB62B}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency Value/Data/{325AC25E-68C1-442F-9562-79C487BC8238}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Change Frequency/Change Frequency Value/Data/Value/{5915B020-9030-4B22-BE4F-C3C1F8C06D32}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Dynamic Routes/__Standard Values/{9208D16D-4D09-4729-9EE9-DE7FF590EFC4}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Dynamic Routes/{C385F256-F2F5-4FEB-A22F-896DBDF76863}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Dynamic Routing/{821B9FA0-BDF0-489D-9E98-DD549416AAA6}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Dynamic Routing/Configuration/{8EE05D58-8870-4A2B-8D57-F0E616175A0B}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Dynamic Routing/Configuration/Data Source/{89E45929-E450-4819-841E-0A4E9BF7810B}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Dynamic Routing/Configuration/Dynamic Item/{3D633D45-8129-4D3D-ADB2-E0B98F640FAD}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Dynamic Routing/Configuration/Is disabled/{4024CF61-3AF0-4A1D-80C9-461FA3C4C857}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Global Configuration/{8E0BF0CC-49A9-4D96-9B50-17C353A6C03E}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Global Configuration/Languages/{744EEE27-828F-4B69-8DB1-7B9003DE3326}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Global Configuration/Languages/Processed languages/{908969F5-CE44-484C-85BE-6F168A62B1DD}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Global Configuration/Sitemap Index/{A147887A-9F9F-4706-82E5-F61BD171CEBF}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Global Configuration/Sitemap Index/Main Site Configuration/{BA54ACD6-7F8F-4373-9ED0-510850EC76FA}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Global Configuration/Sitemap Index/Search Engines/{20F9F33C-42AD-4BB8-939B-4F40703830E8}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Multilevel Dynamic Routing/{F6FFAF82-A2DC-45E4-84C5-CC3AE030CC73}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/{CE2879F2-28AA-43F3-B643-F080128B05C9}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority Definitions/__Standard Values/{1190F977-D0A9-49F4-A275-A7E0AF418967}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority Definitions/{FEDC5E17-4E3E-4057-B191-9D3EFC486277}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Items/__Standard Values/{E12E056A-30D4-44E1-9951-D152E97E82FF}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Items/{0C77276D-A087-4613-94ED-4E90ADB1495E}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Items/Configuration/{B43CC35D-CE66-4FA1-B82C-E2DA5C018180}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Items/Configuration/Items/{5E4EB20E-A845-4C5B-8497-F3DB3C0994B1}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Items/Configuration/Priority/{BF783F93-1E04-413A-A8E4-F8DA900A59CA}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Templates/__Standard Values/{C1669C3B-8767-4237-96DB-0467BF878AB7}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Templates/{7E6B48A3-BD98-4786-AD75-CBC469B4988C}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Templates/Configuration/{EF3476F5-C7B1-4101-B284-127190B43914}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Templates/Configuration/Priority/{7B69BFCD-3A78-429F-B7E3-256741E8EAD6}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Priority/Priority For Templates/Configuration/Templates/{CB2972D4-F982-4286-94C1-72ACFBF083F1}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Search Engine/{BAFCD634-F023-462E-A5B8-B4D569701F2C}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Search Engine/General/{4037F35A-F695-465A-B444-AE0AC5602FD3}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Search Engine/General/Sitemap Submission Uri/{6A65C50B-1A08-469C-AAA8-C2DCE4FF4612}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/__Standard Values/{1C1D0E28-D0DF-4694-AF50-000F35F9D7BA}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/{1D9ED890-8AEF-470B-9354-B418711BBE4C}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Additional Attributes/{EE7E50F4-25A7-420B-986F-061BF98D31BD}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Additional Attributes/Default Change Frequency/{7EB86738-13FA-408C-9395-62F87E33D6A6}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Additional Attributes/Default Priority/{0C9B7B52-5E8C-4750-AD38-430708C16B07}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Additional logic/{B57185A0-6093-436D-A8C5-130A76C7D8BB}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Additional logic/Type to load/{1EEB9FEB-1D08-4F4C-AC74-61D8811FD677}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/{904362C4-7A63-4765-88DD-98134EA185F6}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Excluded Items/{B3B691B9-AC00-4BDC-981B-3ECAEA3E8DBE}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Excluded Paths/{A45E9D67-263D-4614-8D5E-13517EEE9DEB}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Force HTTPS/{C93B13CD-B1CE-4C39-8C65-1AA05041B8AA}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Included Base Templates/{B6C2E413-BB87-45F7-B993-C17E27C9C89F}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Included Templates/{7E606B34-0942-40D8-A0EF-EE7EBBC52DAD}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Root Item/{91A6F73F-857B-4CE0-9284-1ABAAAC60206}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Search Engines/{ED09938B-7071-4E57-8468-E713C5150827}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Server Host/{BBB9BBF4-DE3C-451B-964A-E21C0EF1FAA6}/invariant/0 + /master/sitecore/templates/Dynamic Sitemap XML/Site Configuration/Configuration/Sitemap File Name/{0D83BFDB-F011-4D98-976D-E7FD4E63CDF2}/invariant/0 + + False + + + + + + + Undefined + Undefined + + + + + + + + + templates + + + + /master/sitecore/system/Modules/Dynamic Sitemap XML/{EAB6D9CB-DC0C-44A6-8188-E737B33DC87A}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Change Frequency Values/{5C00C26D-1320-418C-B31A-EBBA4239CC67}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Change Frequency Values/always/{5E4CFDE7-536F-4DD4-89F8-F2D34E7888C0}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Change Frequency Values/daily/{8EC0A486-B6DD-4234-9F6F-CB401B644ABB}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Change Frequency Values/hourly/{8652F9AE-5552-4110-8281-B73700FE1C06}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Change Frequency Values/monthly/{C7AB1374-00CB-4D8B-8AD3-CB715FF93EB8}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Change Frequency Values/never/{84CD0502-D31D-490E-8601-624D8D341AEF}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Change Frequency Values/weekly/{D2981729-1C93-462D-B21F-785056EA99E8}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Change Frequency Values/yearly/{8A0DDF78-74E9-4AB6-9ADE-BFF03EC9A633}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Configuration/{2D727CB6-702F-4196-BE85-C242782F8623}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Search Engines/{A8029E82-E5FC-4350-92EC-75BB8E8F9792}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Search Engines/Bing/{65A9ACE4-56F2-452A-AB28-367426107D5A}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Search Engines/Google/{7AA7EA09-9818-4EF3-9A4B-8B75D9C83F3C}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Search Engines/Yahoo/{389AD958-D388-4EA6-BCD2-F8DFB4EFAC0A}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Sites/{892B82C0-3DE5-478B-B3C4-4E472E3DCD51}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Sites/Website/{A5C9E136-4AE0-4B0B-8D9C-BFAD7EBCAF68}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Sites/Website/Change Frequency Definitions/{6975D5E6-DD3F-4A69-9378-33615A98F5E9}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Sites/Website/Dynamic Routes/{D7B38A87-D3B2-45B4-9F93-DF6E3D722A84}/invariant/0 + /master/sitecore/system/Modules/Dynamic Sitemap XML/Sites/Website/Priority Definitions/{90AF3881-6098-4DAB-B365-0E285D8964B5}/invariant/0 + + False + + + + + + + Undefined + Undefined + + + + + + + + + System + + + + /master/sitecore/templates/Branches/Dynamic Sitemap XML/{20F9E1CA-39FC-4B43-B513-462885848FEE}/invariant/0 + /master/sitecore/templates/Branches/Dynamic Sitemap XML/Site Configuration/$name/{0BF5A8C7-BF2F-45ED-A8AB-3E4348309A9A}/invariant/0 + /master/sitecore/templates/Branches/Dynamic Sitemap XML/Site Configuration/$name/Change Frequency Definitions/{74C3215B-7DA3-4271-ABC1-FA81C97B19C1}/invariant/0 + /master/sitecore/templates/Branches/Dynamic Sitemap XML/Site Configuration/$name/Dynamic Routes/{1C318413-C851-4A78-8C43-DD3FA2D26CAD}/invariant/0 + /master/sitecore/templates/Branches/Dynamic Sitemap XML/Site Configuration/{A788E475-E9E6-4C54-885D-E434A1B2AFCC}/invariant/0 + + False + + + + + + + Undefined + Undefined + + + + + + + + + Branches + + + + /core/sitecore/layout/Layouts/Applications/DynamicSitemapManager/{F9057740-AAEA-42F3-A256-F4785BEEEEA5}/invariant/0 + + False + + + + + + + Undefined + Undefined + + + + + + + + + core layouts + + + + /core/sitecore/content/Applications/DynamicSitemapManager/{9077272A-0E99-4047-8585-3CA88F9F8FBC}/invariant/0 + + False + + + + + + + Undefined + Undefined + + + + + + + + + core applications + + + + /core/sitecore/content/Documents and settings/All users/Start menu/Programs/Dynamic Sitemap Manager/{EDE30158-D13A-44CE-A54C-716991FC2FB2}/invariant/0 + + False + + + + + + + Undefined + Undefined + + + + + + + + + core start menu programs + + + + /core/sitecore/content/Documents and settings/All users/Start menu/Left/Dynamic Sitemap Manager/{0D3568A4-BD7A-4E29-B126-E9EC8FF50310}/invariant/0 + + False + + + + + + + Undefined + Undefined + + + + + + + + + start menu left + + + + /App_Config/Include/Sitecore.SharedSource.DynamicSitemap.config + + + + / + + + + + Undefined + Undefined + + + + + + + + + config + + + + /sitecore modules/Shell/Dynamic Sitemap XML/DynamicSitemapManager.xml + + + + / + + + + + Undefined + Undefined + + + + + + + + + module xml + + + + /bin/Sitecore.SharedSource.DynamicSitemap.dll + + + + / + + + + + Undefined + Undefined + + + + + + + + + dll + + + + + + + + + + + diff --git a/DynamicSitemapPackageDefinitionContentDelivery.xml b/DynamicSitemapPackageDefinitionContentDelivery.xml new file mode 100644 index 0000000..23b5854 --- /dev/null +++ b/DynamicSitemapPackageDefinitionContentDelivery.xml @@ -0,0 +1,74 @@ + + + + SitecoreDynamicSitemapXML-ContentDelivery + + 1.2.1 + + + + + + + + + + + True + + + + /App_Config/Include/Sitecore.SharedSource.DynamicSitemap.config + + + + / + + + + + Undefined + Undefined + + + + + + + + + config + + + + /bin/Sitecore.SharedSource.DynamicSitemap.dll + + + + / + + + + + Undefined + Undefined + + + + + + + + + dll + + + + + + + + + + + diff --git a/Package/SitecoreDynamicSitemapXML-1.0.1.zip b/Package/SitecoreDynamicSitemapXML-1.0.1.zip deleted file mode 100644 index 9adc414..0000000 Binary files a/Package/SitecoreDynamicSitemapXML-1.0.1.zip and /dev/null differ diff --git a/README.md b/README.md index e032714..7ddc8f3 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,10 @@ It has two main assumptions: Code functionality should be extensible and overridable. It should be easy to extend or override functionality, without decompiling and copy-pasting a lot of code. -- - Module was based on the original Sitemap XML module -###New features: +### Features: +- Include items based on Base Templates (a.k.a inherited templates) - Configurations for sites controlled from Content Editor - Defining and tags for templates and specified items - Language fallback for configuration items @@ -31,6 +30,22 @@ Module was based on the original Sitemap XML module ###Installation: - Install zip package using Sitecore Package Installer + +###Building the project +This project includes a web project that can be published to the relevant version of Sitecore (refer to the Sitecore Nuget Reference) + +- Install a fresh instance of Sitecore. SIM (Sitecore Instance Manager) is recommended. +- Update the _/App_Config/Include/Unicorn/Unicorn.CustomSerializationFolder.config_ to point to the _Unicorn-Serialization_ folder +``` + + C:\projects\Sitecore.SharedSource.DynamicSitemap\Unicorn-Serialization\$(configurationName) + +``` +- Publish the web project to the newly installed version of Sitecore +- Run Unicorn sync http://mysite.local/Unicorn.aspx +- Upload and Open the _DynamicSitemapPackageDefinition.xml_ using the Package Manager in the Sitecore shell +- Make changes to the package definition as needed. *Make sure DynamicSitemapPackageDefinition.xml is updated in source control* +- Generate and download ZIP ###Configuration: - Dynamic Sitemap XML provides Sitecore.SharedSource.DynamicSitemap.config configuration file installed in /App_Config/Include directory. @@ -40,4 +55,4 @@ Module was based on the original Sitemap XML module - refreshRobotsFile (true or false) - indicates that robots.txt file will be updated with references to sitemap xml files - xmlnsTpl - sitemap module schema used for the XML sitemap - database - the database from which to pull items for generating the sitemap -- productionEnvironment - (true or false) determines whether the sitemap should be submitted to the search engines or not +- submitToSearchEngine - (true or false) determines whether the sitemap should be submitted to the search engines or not diff --git a/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/Properties/AssemblyInfo.cs b/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/Properties/AssemblyInfo.cs index bc335e9..f0d1868 100644 --- a/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/Properties/AssemblyInfo.cs +++ b/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/Properties/AssemblyInfo.cs @@ -5,6 +5,7 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. + [assembly: AssemblyTitle("Sitecore.SharedSource.DynamicSitemap.ItemsProcessor")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] @@ -17,9 +18,11 @@ // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. + [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM + [assembly: Guid("21b0ab34-57d2-41ed-8e6d-c22dd14b0577")] // Version information for an assembly consists of the following four values: @@ -32,5 +35,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] + [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/SampleItemsProcessor.cs b/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/SampleItemsProcessor.cs index 5514b4d..0779d88 100644 --- a/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/SampleItemsProcessor.cs +++ b/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/SampleItemsProcessor.cs @@ -1,8 +1,10 @@ using Sitecore.SharedSource.DynamicSitemap.Interfaces; + using System; using System.Collections.Generic; using System.Linq; using System.Text; + using Sitecore.SharedSource.DynamicSitemap; using Sitecore.SharedSource.DynamicSitemap.Model; @@ -29,18 +31,19 @@ public List ProcessItems(SitemapSiteConfiguration sitemapSiteConfigu { // - Add your own elements packed into object of UrlElement class - - items.Add(new UrlElement - { - Location = "http://mysite.com/some-custom-static-page.html", - Priority = "0.7", - LastModification = new DateTime(2016, 03, 01), - ChangeFrequency = "yearly" - }); + items.Add( + new UrlElement + { + Location = "http://mysite.com/some-custom-static-page.html", + Priority = "0.7", + LastModification = new DateTime(2016, 03, 01), + ChangeFrequency = "yearly" + }); } - + // - Return collected items - return items; } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor.csproj b/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor.csproj index bafa0ed..608236c 100644 --- a/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor.csproj +++ b/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor/Sitecore.SharedSource.DynamicSitemap.ItemsProcessor.csproj @@ -9,7 +9,7 @@ Properties Sitecore.SharedSource.DynamicSitemap.ItemsProcessor Sitecore.SharedSource.DynamicSitemap.ItemsProcessor - v4.5 + v4.5.2 512 diff --git a/Sitecore.SharedSource.DynamicSitemap.Tests/HelperTests.cs b/Sitecore.SharedSource.DynamicSitemap.Tests/HelperTests.cs index cdbee17..df3fbcf 100644 --- a/Sitecore.SharedSource.DynamicSitemap.Tests/HelperTests.cs +++ b/Sitecore.SharedSource.DynamicSitemap.Tests/HelperTests.cs @@ -1,5 +1,7 @@ using NUnit.Framework; + using Sitecore.SharedSource.DynamicSitemap.Helpers; + using System; namespace Sitecore.SharedSource.DynamicSitemap.Tests @@ -34,4 +36,4 @@ public void TestEnsureHttpPrefix() Assert.AreEqual(DynamicSitemapHelper.EnsureHttpPrefix(urlWithHttp, true), "https" + urlWithoutHttp); } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap.Tests/Properties/AssemblyInfo.cs b/Sitecore.SharedSource.DynamicSitemap.Tests/Properties/AssemblyInfo.cs index b9d70fe..7bdc85a 100644 --- a/Sitecore.SharedSource.DynamicSitemap.Tests/Properties/AssemblyInfo.cs +++ b/Sitecore.SharedSource.DynamicSitemap.Tests/Properties/AssemblyInfo.cs @@ -5,6 +5,7 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. + [assembly: AssemblyTitle("Sitecore.SharedSource.DynamicSitemap.Tests")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] @@ -17,9 +18,11 @@ // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. + [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM + [assembly: Guid("a6e1447c-5bcf-4133-8c73-9aa2d06e37f2")] // Version information for an assembly consists of the following four values: @@ -32,5 +35,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] + [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap.Tests/Sitecore.SharedSource.DynamicSitemap.Tests.csproj b/Sitecore.SharedSource.DynamicSitemap.Tests/Sitecore.SharedSource.DynamicSitemap.Tests.csproj index 4dac8c3..5e15943 100644 --- a/Sitecore.SharedSource.DynamicSitemap.Tests/Sitecore.SharedSource.DynamicSitemap.Tests.csproj +++ b/Sitecore.SharedSource.DynamicSitemap.Tests/Sitecore.SharedSource.DynamicSitemap.Tests.csproj @@ -8,7 +8,7 @@ Properties Sitecore.SharedSource.DynamicSitemap.Tests Sitecore.SharedSource.DynamicSitemap.Tests - v4.6.1 + v4.5.2 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10.0 @@ -16,6 +16,7 @@ $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages False UnitTest + true diff --git a/Sitecore.SharedSource.DynamicSitemap.Tests/packages.config b/Sitecore.SharedSource.DynamicSitemap.Tests/packages.config index 5a94ec9..1f063ae 100644 --- a/Sitecore.SharedSource.DynamicSitemap.Tests/packages.config +++ b/Sitecore.SharedSource.DynamicSitemap.Tests/packages.config @@ -1,4 +1,5 @@  + diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Rainbow.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Rainbow.config new file mode 100644 index 0000000..c2f4add --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Rainbow.config @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.AutoPublish.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.AutoPublish.config new file mode 100644 index 0000000..e6e080f --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.AutoPublish.config @@ -0,0 +1,38 @@ + + + + + + + + + + + + + /sitecore/templates/Common/Folder + + + web + + + + + + + + + + + diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.Configs.DynamicSitemap.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.Configs.DynamicSitemap.config new file mode 100644 index 0000000..1e23383 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.Configs.DynamicSitemap.config @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.CustomSerializationFolder.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.CustomSerializationFolder.config new file mode 100644 index 0000000..c81a99e --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.CustomSerializationFolder.config @@ -0,0 +1,36 @@ + + + + + + + + C:\projects\Sitecore.SharedSource.DynamicSitemap\Unicorn-Serialization\$(configurationName) + + + + + diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.DataProvider.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.DataProvider.config new file mode 100644 index 0000000..bdcc320 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.DataProvider.config @@ -0,0 +1,53 @@ + + + + + + + + $(1) + + + + + + + + + dataProviders/unicorn + + + + + + + dataProviders/unicorn + + + + + + diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.UI.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.UI.config new file mode 100644 index 0000000..cbf90d1 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.UI.config @@ -0,0 +1,98 @@ + + + + + + + + + web + + false + + + + + + + + + + + + + + + /unicorn.aspx + + + + + + + + + + + + + + + + + + + + + + + Unicorn.UI.Commands.UnicornDumpItemCommand, Unicorn + + + Unicorn.UI.Commands.UnicornDumpTreeCommand, Unicorn + + + Unicorn.UI.Commands.UnicornLoadItemCommand, Unicorn + + + Unicorn.UI.Commands.UnicornLoadTreeCommand, Unicorn + + + + diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.config new file mode 100644 index 0000000..a7e00b4 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/App_Config/Include/Unicorn/Unicorn.config @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Properties/AssemblyInfo.cs b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7edb8fd --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Sitecore.SharedSource.DynamicSitemap.UnicornWeb")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Sitecore.SharedSource.DynamicSitemap.UnicornWeb")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("36d13671-06ac-40ec-8825-eaa9223fc229")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Sitecore.SharedSource.DynamicSitemap.UnicornWeb.csproj b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Sitecore.SharedSource.DynamicSitemap.UnicornWeb.csproj new file mode 100644 index 0000000..788c367 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Sitecore.SharedSource.DynamicSitemap.UnicornWeb.csproj @@ -0,0 +1,163 @@ + + + + + + + Debug + AnyCPU + + + 2.0 + {36D13671-06AC-40EC-8825-EAA9223FC229} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + Sitecore.SharedSource.DynamicSitemap.UnicornWeb + Sitecore.SharedSource.DynamicSitemap.UnicornWeb + v4.5.2 + true + + + + + + + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + ..\packages\Kamsar.WebConsole.1.2.2.0\lib\net40\Kamsar.WebConsole.dll + True + + + ..\packages\MicroCHAP.1.2.2.2\lib\net45\MicroCHAP.dll + True + + + ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + True + + + + ..\packages\Rainbow.Core.1.4.1\lib\net452\Rainbow.dll + True + + + ..\packages\Rainbow.Storage.Sc.1.4.1\lib\net452\Rainbow.Storage.Sc.dll + True + + + ..\packages\Rainbow.Storage.Yaml.1.4.1\lib\net452\Rainbow.Storage.Yaml.dll + True + + + + + + + + + + + + + + + + + + + ..\packages\Unicorn.Core.3.3.2\lib\net452\Unicorn.dll + True + + + + + + + + sitecore modules\Shell\Dynamic Sitemap XML\DynamicSitemapManager.xml + + + + + + + + + + App_Config\Include\Sitecore.SharedSource.DynamicSitemap.config + + + + + + + + + {21b0ab34-57d2-41ed-8e6d-c22dd14b0577} + Sitecore.SharedSource.DynamicSitemap.ItemsProcessor + + + {57a4efdd-889f-47cf-a47b-b65f813cb234} + Sitecore.SharedSource.DynamicSitemap + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + + + + + + True + True + 63031 + / + http://localhost:63031/ + False + False + + + False + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Web.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Web.config new file mode 100644 index 0000000..b976e20 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/Web.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/packages.config b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/packages.config new file mode 100644 index 0000000..8f675c2 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap.UnicornWeb/packages.config @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap.sln b/Sitecore.SharedSource.DynamicSitemap.sln index c2899c8..c5b7921 100644 --- a/Sitecore.SharedSource.DynamicSitemap.sln +++ b/Sitecore.SharedSource.DynamicSitemap.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.SharedSource.Dynam EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.SharedSource.DynamicSitemap.ItemsProcessor", "Sitecore.SharedSource.DynamicSitemap.ItemsProcessor\Sitecore.SharedSource.DynamicSitemap.ItemsProcessor.csproj", "{21B0AB34-57D2-41ED-8E6D-C22DD14B0577}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.SharedSource.DynamicSitemap.UnicornWeb", "Sitecore.SharedSource.DynamicSitemap.UnicornWeb\Sitecore.SharedSource.DynamicSitemap.UnicornWeb.csproj", "{36D13671-06AC-40EC-8825-EAA9223FC229}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +29,10 @@ Global {21B0AB34-57D2-41ED-8E6D-C22DD14B0577}.Debug|Any CPU.Build.0 = Debug|Any CPU {21B0AB34-57D2-41ED-8E6D-C22DD14B0577}.Release|Any CPU.ActiveCfg = Release|Any CPU {21B0AB34-57D2-41ED-8E6D-C22DD14B0577}.Release|Any CPU.Build.0 = Release|Any CPU + {36D13671-06AC-40EC-8825-EAA9223FC229}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {36D13671-06AC-40EC-8825-EAA9223FC229}.Debug|Any CPU.Build.0 = Debug|Any CPU + {36D13671-06AC-40EC-8825-EAA9223FC229}.Release|Any CPU.ActiveCfg = Release|Any CPU + {36D13671-06AC-40EC-8825-EAA9223FC229}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Sitecore.SharedSource.DynamicSitemap/App_Config/Include/Sitecore.SharedSource.DynamicSitemap.config b/Sitecore.SharedSource.DynamicSitemap/App_Config/Include/Sitecore.SharedSource.DynamicSitemap.config index cb2b17d..88368f8 100644 --- a/Sitecore.SharedSource.DynamicSitemap/App_Config/Include/Sitecore.SharedSource.DynamicSitemap.config +++ b/Sitecore.SharedSource.DynamicSitemap/App_Config/Include/Sitecore.SharedSource.DynamicSitemap.config @@ -17,7 +17,9 @@ --> - + @@ -46,7 +48,7 @@ - + @@ -55,7 +57,7 @@ - + diff --git a/Sitecore.SharedSource.DynamicSitemap/Configuration/DynamicSitemapConfiguration.cs b/Sitecore.SharedSource.DynamicSitemap/Configuration/DynamicSitemapConfiguration.cs index 248335d..3fb885c 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Configuration/DynamicSitemapConfiguration.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Configuration/DynamicSitemapConfiguration.cs @@ -1,4 +1,5 @@ using Sitecore.Xml; + using System; using System.Collections.Generic; using System.Linq; @@ -77,11 +78,11 @@ public static string SitemapConfigurationOutputFolder } } - public static bool IsProductionEnvironment + public static bool SubmitToSearchEngine { get { - string valueByName = GetValueByName("productionEnvironment"); + string valueByName = GetValueByName("submitToSearchEngine"); return !string.IsNullOrEmpty(valueByName) && (valueByName.ToLower() == "true" || valueByName == "1"); } } @@ -119,4 +120,4 @@ private static string GetValueByName(string name) return result; } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Constants/Messages.cs b/Sitecore.SharedSource.DynamicSitemap/Constants/Messages.cs index d25677b..f9b25a6 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Constants/Messages.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Constants/Messages.cs @@ -9,17 +9,24 @@ public static class Messages { public static readonly String Label = "DynamicSitemapGenerator: "; - public static readonly String ExecutionInterrupted = Label + "There are no sitemap configurations, execution interrupted."; + public static readonly String ExecutionInterrupted = Label + + "There are no sitemap configurations, execution interrupted."; + public static readonly String NoConfigurations = Label + "There are no sitemap configurations."; - public static readonly String NoGlobalScConfiguration = Label + "There is no global Sitecore configuration Item."; - public static readonly String ExceptionWhileBuilding = Label + "Exception while building sitemap for {0} - {1}\n\n{2}"; + public static readonly String NoGlobalScConfiguration = Label + + "There is no global Sitecore configuration Item."; + + public static readonly String ExceptionWhileBuilding = Label + + "Exception while building sitemap for {0} - {1}\n\n{2}"; public static readonly String SitemapBuidSuccess = Label + "Sitemap generated - {0}"; public static readonly String SitemapSubmitterCannotSubmit = Label + "Cannot submit sitemap to \"{0}\" - {1}"; - public static readonly String SitemapSubmitterExceptionWhileSubmit = Label + "Search engine submission \"{0}\" returns an error - {1} \n\n{2}"; + + public static readonly String SitemapSubmitterExceptionWhileSubmit = Label + + "Search engine submission \"{0}\" returns an error - {1} \n\n{2}"; public static readonly String CannotLoadItemsProcessor = Label + "Cannot load ItemsProcessor type \"{0}\""; } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Constants/TemplateIds.cs b/Sitecore.SharedSource.DynamicSitemap/Constants/TemplateIds.cs index 3ae76ec..0e34fd2 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Constants/TemplateIds.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Constants/TemplateIds.cs @@ -12,11 +12,15 @@ public class TemplateIds public const String SearchEngineTemplateId = "{BAFCD634-F023-462E-A5B8-B4D569701F2C}"; public const String ChangeFrequencyDefinitionsFolderTemplateId = "{6E82C74A-5940-473B-8B60-CBB9D79EDB2D}"; + public const String ChangeFrequencyForItemsTemplateId = "{9551D9F7-A66A-4A49-A705-B0B2918C0EB5}"; + public const String ChangeFrequencyForTemplatesTemplateId = "{A1F7C913-E331-4172-BD26-0621DFBCD529}"; public const String PriorityDefinitionsFolderTemplateId = "{FEDC5E17-4E3E-4057-B191-9D3EFC486277}"; + public const String PriorityForItemsTemplateId = "{0C77276D-A087-4613-94ED-4E90ADB1495E}"; + public const String PriorityForTemplatesTemplateId = "{7E6B48A3-BD98-4786-AD75-CBC469B4988C}"; } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/DynamicSitemapGenerator.cs b/Sitecore.SharedSource.DynamicSitemap/DynamicSitemapGenerator.cs index 40d185b..fb62aee 100644 --- a/Sitecore.SharedSource.DynamicSitemap/DynamicSitemapGenerator.cs +++ b/Sitecore.SharedSource.DynamicSitemap/DynamicSitemapGenerator.cs @@ -1,12 +1,12 @@ using Sitecore.Data; using Sitecore.Data.Items; using Sitecore.Globalization; +using Sitecore.IO; using Sitecore.Links; using Sitecore.SharedSource.DynamicSitemap.Configuration; using Sitecore.SharedSource.DynamicSitemap.Constants; using Sitecore.SharedSource.DynamicSitemap.Extensions; using Sitecore.SharedSource.DynamicSitemap.Helpers; -using Sitecore.SharedSource.DynamicSitemap.Interfaces; using Sitecore.SharedSource.DynamicSitemap.Logic; using Sitecore.SharedSource.DynamicSitemap.Model; using Sitecore.SharedSource.DynamicSitemap.Modules; @@ -38,7 +38,7 @@ public class DynamicSitemapGenerator /// Sitemap index /// protected SitemapIndexConfiguration SitemapIndex { get; set; } - + /// /// Sitemap file name format /// @@ -59,13 +59,13 @@ public Database Database return Sitecore.Configuration.Factory.GetDatabase(DynamicSitemapConfiguration.WorkingDatabase); } } - + /// /// Dynamic Sitemap Generator /// public DynamicSitemapGenerator() { - SiteConfigurations = new List(); + this.SiteConfigurations = new List(); } /// @@ -73,7 +73,7 @@ public DynamicSitemapGenerator() /// /// /// - public void RegenerateSitemap(object sender, System.EventArgs args) + public void RegenerateSitemap(object sender, EventArgs args) { if (args == null) { @@ -82,22 +82,22 @@ public void RegenerateSitemap(object sender, System.EventArgs args) EnsureSitemapsDirectoryExists(); - ReadConfigurations(); + this.ReadConfigurations(); - if (SiteConfigurations.Count == 0) + if (this.SiteConfigurations.Count == 0) { - Sitecore.Diagnostics.Log.Warn(Messages.ExecutionInterrupted, this); + Diagnostics.Log.Warn(Messages.ExecutionInterrupted, this); return; } - GenerateSitemaps(); - GenerateSitemapsIndex(); + this.GenerateSitemaps(); + this.GenerateSitemapsIndex(); - RegisterSitemapToRobotsFile(); + this.RegisterSitemapToRobotsFile(); - if (DynamicSitemapConfiguration.IsProductionEnvironment) + if (DynamicSitemapConfiguration.SubmitToSearchEngine) { - var submitter = new SitemapSubmitter(SitecoreConfiguration, SiteConfigurations, Database); + var submitter = new SitemapSubmitter(this.SitecoreConfiguration, this.SiteConfigurations, this.Database); submitter.SubmitSitemapsToSearchEngines(); } } @@ -107,21 +107,21 @@ public void RegenerateSitemap(object sender, System.EventArgs args) /// public void ReadConfigurations() { - ReadGlobalSitecoreConfiguration(); + this.ReadGlobalSitecoreConfiguration(); - Item[] configurationItems = Database.SelectItems(DynamicSitemapConfiguration.SitemapConfigurationItemPath + DynamicSitemapConfiguration.SitemapConfigurationSitesFolderName + "/*[@@templateid='" + TemplateIds.SiteConfigurationTemplateId + "']"); + Item[] configurationItems = this.Database.SelectItems(DynamicSitemapConfiguration.SitemapConfigurationItemPath + DynamicSitemapConfiguration.SitemapConfigurationSitesFolderName + "/*[@@templateid='" + TemplateIds.SiteConfigurationTemplateId + "']"); if (configurationItems.Count() == 0) { - Sitecore.Diagnostics.Log.Warn(Messages.NoConfigurations, this); + Diagnostics.Log.Warn(Messages.NoConfigurations, this); return; } - SiteConfigurations = new List(); + this.SiteConfigurations = new List(); foreach (var configurationItem in configurationItems) { - var languageItems = configurationItem.Languages.Where(x => SitecoreConfiguration.ProcessedLanguages.Contains(x.Name)).ToList(); + var languageItems = configurationItem.Languages.Where(x => this.SitecoreConfiguration.ProcessedLanguages.Contains(x.Name)).ToList(); foreach (var languageItem in languageItems) { @@ -135,7 +135,7 @@ public void ReadConfigurations() sitemapSiteConfiguration.SitemapFileName = sitemapSiteConfiguration.SitemapFileName != String.Empty ? sitemapSiteConfiguration.SitemapFileName - : String.Format(_sitemapFileNameFormat, site, languageItem.Name.ToLower()); + : String.Format(this._sitemapFileNameFormat, site, languageItem.Name.ToLower()); sitemapSiteConfiguration.SitemapFilePath = DynamicSitemapConfiguration.SitemapConfigurationOutputFolder + "/" + sitemapSiteConfiguration.SitemapFileName; @@ -153,22 +153,28 @@ public void ReadConfigurations() else { - Sitecore.Diagnostics.Log.Warn(String.Format(Messages.CannotLoadItemsProcessor, sitemapSiteConfiguration.ItemsProcessorTypeToLoad), this); + Diagnostics.Log.Warn(String.Format(Messages.CannotLoadItemsProcessor, sitemapSiteConfiguration.ItemsProcessorTypeToLoad), this); } } - - SiteConfigurations.Add(sitemapSiteConfiguration); + + this.SiteConfigurations.Add(sitemapSiteConfiguration); } } } - SitecoreConfiguration.MainSiteConfiguration = SiteConfigurations.FirstOrDefault(x => x.Site.Name.ToLower() == SitecoreConfiguration.MainSiteConfigurationItem.Name.ToLower()); + this.SitecoreConfiguration.MainSiteConfiguration = this.SiteConfigurations.FirstOrDefault(x => x.Site.Name.ToLower() == this.SitecoreConfiguration.MainSiteConfigurationItem.Name.ToLower()); - SitemapIndex = new SitemapIndexConfiguration(); - SitemapIndex.ServerHost = SitecoreConfiguration.MainSiteConfiguration != null - ? SitecoreConfiguration.MainSiteConfiguration.ServerHost - : SiteConfigurations.FirstOrDefault().ServerHost; - SitemapIndex.FileName = _sitemapIndexFileName; + this.SitemapIndex = new SitemapIndexConfiguration(); + + var siteConfiguration = this.SitecoreConfiguration.MainSiteConfiguration ?? this.SiteConfigurations.FirstOrDefault(); + + if (siteConfiguration != null) + { + this.SitemapIndex.ServerHost = siteConfiguration.ServerHost; + this.SitemapIndex.ForceHttps = siteConfiguration.ForceHttps; + this.SitemapIndex.TargetHostName = siteConfiguration.TargetHost; + } + this.SitemapIndex.FileName = this._sitemapIndexFileName; } /// @@ -176,11 +182,11 @@ public void ReadConfigurations() /// protected void ReadGlobalSitecoreConfiguration() { - Item globalConfigurationItem = Database.GetItem(DynamicSitemapConfiguration.SitemapConfigurationItemPath + "/Configuration"); + Item globalConfigurationItem = this.Database.GetItem(DynamicSitemapConfiguration.SitemapConfigurationItemPath + "/Configuration"); if (globalConfigurationItem == null) { - Sitecore.Diagnostics.Log.Error(Messages.NoGlobalScConfiguration, this); + Diagnostics.Log.Error(Messages.NoGlobalScConfiguration, this); return; } @@ -188,21 +194,21 @@ protected void ReadGlobalSitecoreConfiguration() if (globalConfigurationItem["Main Site Configuration"] != String.Empty) { - mainSiteConfiguration = Database.GetItem(globalConfigurationItem["Main Site Configuration"]); + mainSiteConfiguration = this.Database.GetItem(globalConfigurationItem["Main Site Configuration"]); } - SitecoreConfiguration = new DynamicSitemapSitecoreConfiguration(); + this.SitecoreConfiguration = new DynamicSitemapSitecoreConfiguration(); if (mainSiteConfiguration != null) { - SitecoreConfiguration.MainSiteConfigurationItem = mainSiteConfiguration; + this.SitecoreConfiguration.MainSiteConfigurationItem = mainSiteConfiguration; } - SitecoreConfiguration.SearchEngines = !String.IsNullOrEmpty(globalConfigurationItem["Search Engines"]) + this.SitecoreConfiguration.SearchEngines = !String.IsNullOrEmpty(globalConfigurationItem["Search Engines"]) ? globalConfigurationItem["Search Engines"].Split('|').ToList() : new List(); - SitecoreConfiguration.ProcessedLanguages = new List(); + this.SitecoreConfiguration.ProcessedLanguages = new List(); if (!String.IsNullOrEmpty(globalConfigurationItem["Processed languages"])) { @@ -210,11 +216,11 @@ protected void ReadGlobalSitecoreConfiguration() foreach (var itemId in itemIds) { - var item = Database.GetItem(itemId); + var item = this.Database.GetItem(itemId); if (item != null) { - SitecoreConfiguration.ProcessedLanguages.Add(item.Name); + this.SitecoreConfiguration.ProcessedLanguages.Add(item.Name); } } } @@ -225,11 +231,11 @@ protected void ReadGlobalSitecoreConfiguration() /// protected void GenerateSitemaps() { - foreach (var sitemapSiteConfiguration in SiteConfigurations) + foreach (var sitemapSiteConfiguration in this.SiteConfigurations) { - var sitemapContent = BuildSitemap(sitemapSiteConfiguration); + var sitemapContent = this.BuildSitemap(sitemapSiteConfiguration); - string path = Sitecore.MainUtil.MapPath(sitemapSiteConfiguration.SitemapFilePath); + string path = FileUtil.MapPath(null, sitemapSiteConfiguration.SitemapFilePath); StreamWriter streamWriter = new StreamWriter(path, false); streamWriter.Write(sitemapContent); @@ -246,13 +252,13 @@ public String BuildSitemap(SitemapSiteConfiguration sitemapSiteConfiguration) { var result = String.Empty; - var options = GetUrlOptions(); + var options = this.GetUrlOptions(); var encoding = Encoding.UTF8; StringWriterWithEncoding stringWriter = new StringWriterWithEncoding(encoding); // - Creating the XML Header - - + var xml = new XmlTextWriter(stringWriter); xml.WriteStartDocument(); xml.WriteStartElement("urlset", DynamicSitemapConfiguration.XmlnsTpl); @@ -262,14 +268,14 @@ public String BuildSitemap(SitemapSiteConfiguration sitemapSiteConfiguration) options.Site = sitemapSiteConfiguration.Site; options.Language = sitemapSiteConfiguration.Language; - List items = GetItems(sitemapSiteConfiguration.Site.RootPath, sitemapSiteConfiguration.Language); - - ProcessItems(items, sitemapSiteConfiguration, options, xml); + List items = this.GetItems(sitemapSiteConfiguration.Site.RootPath, sitemapSiteConfiguration.Language); + + this.ProcessItems(items, sitemapSiteConfiguration, options, xml); } catch (Exception exc) { - Sitecore.Diagnostics.Log.Error(String.Format(Messages.ExceptionWhileBuilding, sitemapSiteConfiguration.Site.Name, exc.Message, exc.StackTrace) , this); + Diagnostics.Log.Error(String.Format(Messages.ExceptionWhileBuilding, sitemapSiteConfiguration.Site.Name, exc.Message, exc.StackTrace), this); } finally @@ -280,7 +286,7 @@ public String BuildSitemap(SitemapSiteConfiguration sitemapSiteConfiguration) result = stringWriter.ToString(); - Sitecore.Diagnostics.Log.Info(String.Format(Messages.SitemapBuidSuccess, sitemapSiteConfiguration), this); + Diagnostics.Log.Info(String.Format(Messages.SitemapBuidSuccess, sitemapSiteConfiguration), this); } return result; @@ -309,7 +315,7 @@ protected void GenerateSitemapsIndex() try { - foreach (var sitemap in SiteConfigurations) + foreach (var sitemap in this.SiteConfigurations) { xml.WriteStartElement("sitemap"); xml.WriteElementString("loc", sitemap.SitemapUrl); @@ -325,7 +331,7 @@ protected void GenerateSitemapsIndex() catch (Exception exc) { - Sitecore.Diagnostics.Log.Error("DynamicSitemapGenerator: " + exc.Message + "\n\n" + exc.StackTrace, this); + Diagnostics.Log.Error("DynamicSitemapGenerator: " + exc.Message + "\n\n" + exc.StackTrace, this); } finally @@ -335,14 +341,14 @@ protected void GenerateSitemapsIndex() xml.Flush(); String result = stringWriter.ToString(); - - string path = Sitecore.MainUtil.MapPath("/" + SitemapIndex.FileName); + + string path = MainUtil.MapPath("/" + this.SitemapIndex.FileName); StreamWriter streamWriter = new StreamWriter(path, false); streamWriter.Write(result); streamWriter.Close(); - - Sitecore.Diagnostics.Log.Info("DynamicSitemapGenerator: Sitemap index generated - in path " + path + ", " + sitemapsCount + " sitemaps attached", this); + + Diagnostics.Log.Info("DynamicSitemapGenerator: Sitemap index generated - in path " + path + ", " + sitemapsCount + " sitemaps attached", this); } } @@ -359,17 +365,27 @@ protected List GetItems(String rootPath, Language language) using (new LanguageSwitcher(language.Name)) { // - Add root Item - - items.Add(Database.SelectSingleItem(rootPath)); + var rootItem = this.Database.SelectSingleItem(rootPath); + if (rootItem == null) + { + return new List(); + } - items.AddRange( - Database.SelectItems("fast:" + rootPath + "//*") - .ToList() - ); + items.Add(rootItem); + this.AppendItems(items, rootItem); } - return items; } + public void AppendItems(List itemList, Item item) + { + foreach (Item childItem in item.Children) + { + itemList.Add(childItem); + this.AppendItems(itemList, childItem); + } + } + /// /// Processes all items in site under root path /// @@ -379,16 +395,18 @@ protected List GetItems(String rootPath, Language language) /// Xml Text Writer object public void ProcessItems(List items, SitemapSiteConfiguration sitemapSiteConfiguration, UrlOptions options, XmlTextWriter xml) { + var templateCache = new Dictionary(); + foreach (var item in items) { if (item.Versions.Count > 0) { if (DynamicSitemapHelper.IsWildcard(item)) { - PrepareDynamicItems(item, sitemapSiteConfiguration, xml); + this.PrepareDynamicItems(item, sitemapSiteConfiguration, xml, templateCache); } - else if (IsIncluded(item, sitemapSiteConfiguration)) + else if (this.IsIncluded(item, sitemapSiteConfiguration, templateCache)) { var url = LinkManager.GetItemUrl(item, options); url = DynamicSitemapHelper.EnsureHttpPrefix(url, sitemapSiteConfiguration.ForceHttps); @@ -398,7 +416,7 @@ public void ProcessItems(List items, SitemapSiteConfiguration sitemapSiteC url = DynamicSitemapHelper.ReplaceHost(url, sitemapSiteConfiguration.ServerHost); } - GenerateUrlElement(url, item, sitemapSiteConfiguration, xml); + this.GenerateUrlElement(url, item, sitemapSiteConfiguration, xml); } } } @@ -409,7 +427,7 @@ public void ProcessItems(List items, SitemapSiteConfiguration sitemapSiteC foreach (var urlItem in urlItems) { - GenerateUrlElement(urlItem, sitemapSiteConfiguration, xml); + this.GenerateUrlElement(urlItem, sitemapSiteConfiguration, xml); } } } @@ -420,24 +438,25 @@ public void ProcessItems(List items, SitemapSiteConfiguration sitemapSiteC /// Wildcard Item /// Sitemap site configuration /// XmlTextWriter object - protected void PrepareDynamicItems(Item wildcardItem, SitemapSiteConfiguration sitemapSiteConfiguration, XmlTextWriter xml) + /// + protected void PrepareDynamicItems(Item wildcardItem, SitemapSiteConfiguration sitemapSiteConfiguration, XmlTextWriter xml, Dictionary templateCache) { var dynamicRoute = sitemapSiteConfiguration.DynamicRoutes.SingleOrDefault(x => x["Dynamic Item"] == wildcardItem.ID.ToString()); if (dynamicRoute != null) { - var datasource = Database.GetItem(dynamicRoute["Data Source"]); + var datasource = this.Database.GetItem(dynamicRoute["Data Source"]); if (datasource != null && datasource.HasChildren) { - UrlOptions options = GetUrlOptions(); + UrlOptions options = this.GetUrlOptions(); options.Site = sitemapSiteConfiguration.Site; var dynamicItemActualUrl = LinkManager.GetItemUrl(wildcardItem, options); foreach (var item in datasource.Children.ToList()) { - if (item.Versions.Count > 0 && IsIncluded(item, sitemapSiteConfiguration, true)) + if (item.Versions.Count > 0 && this.IsIncluded(item, sitemapSiteConfiguration, templateCache, true)) { var lastSegment = item.Name; lastSegment = options.LowercaseUrls ? lastSegment.ToLower() : lastSegment; @@ -452,8 +471,8 @@ protected void PrepareDynamicItems(Item wildcardItem, SitemapSiteConfiguration s { url = DynamicSitemapHelper.ReplaceHost(url, sitemapSiteConfiguration.ServerHost); } - - GenerateUrlElement(url, item, sitemapSiteConfiguration, xml); + + this.GenerateUrlElement(url, item, sitemapSiteConfiguration, xml); } } } @@ -505,7 +524,7 @@ protected void GenerateUrlElement(String url, Item item, SitemapSiteConfiguratio xml.WriteElementString("priority", priority); } } - + xml.WriteEndElement(); } @@ -515,16 +534,16 @@ protected void GenerateUrlElement(UrlElement urlElement, SitemapSiteConfiguratio xml.WriteStartElement("url"); xml.WriteElementString("loc", urlElement.Location); - + var lastModified = urlElement.LastModification.ToString("yyyy-MM-ddThh:mm:sszzz"); xml.WriteElementString("lastmod", lastModified); - + if (urlElement.ChangeFrequency != String.Empty) { xml.WriteElementString("changefreq", urlElement.ChangeFrequency); } - + if (urlElement.Priority != String.Empty) { xml.WriteElementString("priority", urlElement.Priority); @@ -537,37 +556,58 @@ protected void GenerateUrlElement(UrlElement urlElement, SitemapSiteConfiguratio /// Checks if Item can be included in sitemap /// /// Item + /// + /// /// Is item used only in wildcard /// true if included - protected bool IsIncluded(Item item, SitemapSiteConfiguration sitemapSiteConfiguration, bool isDataSourceItem = false) + protected bool IsIncluded(Item item, SitemapSiteConfiguration sitemapSiteConfiguration, Dictionary templateCache, bool isDataSourceItem = false) { - var result = false; - - if (!sitemapSiteConfiguration.ExcludedItems.Any(x => x == item.ID.ToString()) - && sitemapSiteConfiguration.IncludedTemplates.Contains(item.TemplateID.ToString()) + return sitemapSiteConfiguration.ExcludedItems.All(x => x != item.ID.ToString()) + && this.MatchesTemplates(sitemapSiteConfiguration, item, templateCache) && !sitemapSiteConfiguration.ExcludedItemPaths.Any(x => item.Paths.FullPath.StartsWith(x.Paths.FullPath) && item.Paths.FullPath.Equals(x.Paths.FullPath)) && (item.Paths.FullPath.StartsWith(sitemapSiteConfiguration.RootItem.Paths.FullPath) || item.Paths.FullPath.Equals(sitemapSiteConfiguration.RootItem.Paths.FullPath) - || isDataSourceItem)) // - datasource items can be out of root item + || isDataSourceItem); + } + + private bool MatchesTemplates(SitemapSiteConfiguration sitemapSiteConfiguration, Item item, Dictionary templateCache) + { + var templateId = item.TemplateID.Guid; + + if (templateCache.ContainsKey(templateId)) { - result = true; + return templateCache[templateId]; } - return result; + bool matchesTemplate; + if (sitemapSiteConfiguration.IncludedTemplates.Contains(templateId)) + { + // matches the allowed templates + matchesTemplate = true; + } + else + { + // slow - need local caching + var baseTemplates = TemplateHelper.GetBaseTemplates(item); + matchesTemplate = sitemapSiteConfiguration.IncludedBaseTemplates.Any(guid => baseTemplates.Contains(guid)); + } + + templateCache.Add(templateId, matchesTemplate); + return matchesTemplate; } - + /// /// Ensures that sitemaps directory exists /// protected static void EnsureSitemapsDirectoryExists() { - String dirPath = Sitecore.MainUtil.MapPath(DynamicSitemapConfiguration.SitemapConfigurationOutputFolder + "/"); + String dirPath = MainUtil.MapPath(DynamicSitemapConfiguration.SitemapConfigurationOutputFolder + "/"); if (!Directory.Exists(dirPath)) { Directory.CreateDirectory(dirPath); } } - + /// /// Registers sitemaps to robots.txt /// @@ -592,12 +632,12 @@ public void RegisterSitemapToRobotsFile() if (DynamicSitemapConfiguration.UseSitemapsIndexFile) { - sitemapUrls.Add(SitemapIndex.Url); + sitemapUrls.Add(this.SitemapIndex.Url); } else { - sitemapUrls.AddRange(SiteConfigurations.Select(x => x.SitemapUrl)); + sitemapUrls.AddRange(this.SiteConfigurations.Select(x => x.SitemapUrl)); } foreach (var url in sitemapUrls) diff --git a/Sitecore.SharedSource.DynamicSitemap/DynamicSitemapManagerForm.cs b/Sitecore.SharedSource.DynamicSitemap/DynamicSitemapManagerForm.cs index b057f73..73948a1 100644 --- a/Sitecore.SharedSource.DynamicSitemap/DynamicSitemapManagerForm.cs +++ b/Sitecore.SharedSource.DynamicSitemap/DynamicSitemapManagerForm.cs @@ -2,6 +2,7 @@ using Sitecore.SharedSource.DynamicSitemap.Configuration; using Sitecore.Web.UI.HtmlControls; using Sitecore.Web.UI.Sheer; + using System; using System.Collections.Generic; using System.Linq; @@ -32,7 +33,7 @@ public class DynamicSitemapManagerForm : BaseForm protected override void OnLoad(EventArgs e) { base.OnLoad(e); - + this.RefreshButton.Click = "RefreshButtonClick"; Border border = Context.ClientPage.FindControl("Content") as Border; @@ -43,20 +44,24 @@ protected override void OnLoad(EventArgs e) foreach (var config in dynamicSitemapGenerator.SiteConfigurations) { var newBorder = new Border() - { - Border = "1px solid #d9d9d9", - Padding = "5px 15px", - Margin = "0 0 2px 0" - }; + { + Border = "1px solid #d9d9d9", + Padding = "5px 15px", + Margin = "0 0 2px 0" + }; var literal = new Border() - { - InnerHtml = String.Format("Site name: {0}, Language: {1}", config.Site.Name, config.LanguageName), - Width = 200, - //Float = "left", - Padding = "10px 0px;" - }; - + { + InnerHtml = + String.Format( + "Site name: {0}, Language: {1}", + config.Site.Name, + config.LanguageName), + Width = 200, + //Float = "left", + Padding = "10px 0px;" + }; + newBorder.Controls.Add(literal); border.Controls.Add(newBorder); @@ -77,7 +82,9 @@ public void RefreshButtonClick() if (dynamicSitemapGenerator.SiteConfigurations == null || !dynamicSitemapGenerator.SiteConfigurations.Any()) { - this.Message.Text = "No sitemap configurations found under " + DynamicSitemapConfiguration.SitemapConfigurationItemPath + ". Please create one or more configuration nodes and try refreshing again."; + this.Message.Text = "No sitemap configurations found under " + + DynamicSitemapConfiguration.SitemapConfigurationItemPath + + ". Please create one or more configuration nodes and try refreshing again."; DynamicSitemapManagerForm.RefreshPanel("MainPanel"); } @@ -89,7 +96,7 @@ public void RefreshButtonClick() { message += String.Format("
  • • {0}
  • ", configuration); } - + message += ""; this.Message.Text = message; @@ -108,4 +115,4 @@ private static void RefreshPanel(String panelName) Context.ClientPage.ClientResponse.Refresh(panel); } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Extensions/StringExtensions.cs b/Sitecore.SharedSource.DynamicSitemap/Extensions/StringExtensions.cs index effe211..8f01182 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Extensions/StringExtensions.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Extensions/StringExtensions.cs @@ -28,4 +28,4 @@ public static string ReplaceFirst(this string text, string search, string replac return text.Substring(0, pos) + replace + text.Substring(pos + search.Length); } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Extensions/StringWriterWithEncoding.cs b/Sitecore.SharedSource.DynamicSitemap/Extensions/StringWriterWithEncoding.cs index 2cb526d..c1047ff 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Extensions/StringWriterWithEncoding.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Extensions/StringWriterWithEncoding.cs @@ -17,7 +17,10 @@ public StringWriterWithEncoding(Encoding encoding) public override Encoding Encoding { - get { return encoding; } + get + { + return encoding; + } } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Helpers/DynamicSitemapHelper.cs b/Sitecore.SharedSource.DynamicSitemap/Helpers/DynamicSitemapHelper.cs index cf158bf..19522d0 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Helpers/DynamicSitemapHelper.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Helpers/DynamicSitemapHelper.cs @@ -1,5 +1,6 @@ using Sitecore.Data.Items; using Sitecore.SharedSource.DynamicSitemap.Extensions; + using System; using System.Collections.Generic; using System.Linq; @@ -26,8 +27,8 @@ public static String ReplaceHost(string url, string serverHost) UriBuilder builder = new UriBuilder(uri); serverHost = serverHost.Replace("http://", String.Empty) - .Replace("https://", String.Empty) - .Replace("/", String.Empty); + .Replace("https://", String.Empty) + .Replace("/", String.Empty); builder.Host = serverHost; @@ -56,12 +57,13 @@ public static bool IsWildcard(Item item) /// public static String EnsureHttpPrefix(String url, bool useHttps = false) { - if (!url.StartsWith("http") && !url.StartsWith("https")) + + if (!url.StartsWith("http://") && !url.StartsWith("https://")) { - url = (useHttps ? "https" : "http") + url; + url = (useHttps ? "https://" : "http://") + url; } - else if (url.StartsWith("http") && useHttps) + if (!url.StartsWith("https") && useHttps) { url = url.ReplaceFirst("http", "https"); } @@ -78,12 +80,18 @@ public static bool IsPage(Item item) { var result = false; var layoutField = new Data.Fields.LayoutField(item.Fields[FieldIDs.LayoutField]); - if (!layoutField.InnerField.HasValue || string.IsNullOrEmpty(layoutField.Value)) return false; + if (!layoutField.InnerField.HasValue || string.IsNullOrEmpty(layoutField.Value)) + { + return false; + } var layout = Layouts.LayoutDefinition.Parse(layoutField.Value); foreach (var deviceObj in layout.Devices) { var device = deviceObj as Layouts.DeviceDefinition; - if (device == null) return false; + if (device == null) + { + return false; + } if (device.Renderings.Count > 0) { result = true; @@ -92,4 +100,4 @@ public static bool IsPage(Item item) return result; } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Interfaces/IItemsProcessor.cs b/Sitecore.SharedSource.DynamicSitemap/Interfaces/IItemsProcessor.cs index 196a23b..fc70a81 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Interfaces/IItemsProcessor.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Interfaces/IItemsProcessor.cs @@ -1,4 +1,5 @@ using Sitecore.SharedSource.DynamicSitemap.Model; + using System; using System.Collections.Generic; using System.Linq; @@ -11,4 +12,4 @@ public interface IItemsProcessor { List ProcessItems(SitemapSiteConfiguration sitemapSiteConfiguration); } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Logic/SitemapSubmitter.cs b/Sitecore.SharedSource.DynamicSitemap/Logic/SitemapSubmitter.cs index e2d5c3b..cc63fa1 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Logic/SitemapSubmitter.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Logic/SitemapSubmitter.cs @@ -3,6 +3,7 @@ using Sitecore.SharedSource.DynamicSitemap.Configuration; using Sitecore.SharedSource.DynamicSitemap.Constants; using Sitecore.SharedSource.DynamicSitemap.Model; + using System; using System.Collections.Generic; using System.IO; @@ -31,7 +32,7 @@ public class SitemapSubmitter /// Site configurations list /// protected List SiteConfigurations { get; set; } - + /// /// Sitemap index /// @@ -39,7 +40,10 @@ public class SitemapSubmitter protected List SubmissionUrlsConfig { get; set; } - public SitemapSubmitter(DynamicSitemapSitecoreConfiguration config, List siteConfigurations, Database database) + public SitemapSubmitter( + DynamicSitemapSitecoreConfiguration config, + List siteConfigurations, + Database database) { SitecoreConfiguration = config; SiteConfigurations = siteConfigurations; @@ -133,15 +137,22 @@ protected void SubmitEngine(string engine, string sitemapUrl) if (httpWebResponse.StatusCode != HttpStatusCode.OK) { - Diagnostics.Log.Error(String.Format(Messages.SitemapSubmitterCannotSubmit, engine, httpWebResponse.StatusDescription), this); + Diagnostics.Log.Error( + String.Format( + Messages.SitemapSubmitterCannotSubmit, + engine, + httpWebResponse.StatusDescription), + this); } } catch (Exception exc) { - Diagnostics.Log.Warn(String.Format(Messages.SitemapSubmitterExceptionWhileSubmit, text, exc.Message, exc.StackTrace), this); + Diagnostics.Log.Warn( + String.Format(Messages.SitemapSubmitterExceptionWhileSubmit, text, exc.Message, exc.StackTrace), + this); } } } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Model/DynamicSitemapSitecoreConfiguration.cs b/Sitecore.SharedSource.DynamicSitemap/Model/DynamicSitemapSitecoreConfiguration.cs index 8441893..da36eeb 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Model/DynamicSitemapSitecoreConfiguration.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Model/DynamicSitemapSitecoreConfiguration.cs @@ -1,4 +1,5 @@ using Sitecore.Data.Items; + using System; using System.Collections.Generic; using System.Linq; @@ -32,4 +33,4 @@ public class DynamicSitemapSitecoreConfiguration /// public List ProcessedLanguages { get; set; } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Model/SitemapIndexConfiguration.cs b/Sitecore.SharedSource.DynamicSitemap/Model/SitemapIndexConfiguration.cs index 31bbe9d..7ca2c40 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Model/SitemapIndexConfiguration.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Model/SitemapIndexConfiguration.cs @@ -1,4 +1,5 @@ using Sitecore.Links; +using Sitecore.SharedSource.DynamicSitemap.Helpers; using System; using System.Collections.Generic; using System.Linq; @@ -17,6 +18,11 @@ public class SitemapIndexConfiguration /// public string ServerHost { get; set; } + /// + /// Forces generating https urls + /// + public bool ForceHttps { get; set; } + /// /// Sitemap index file name /// @@ -29,15 +35,16 @@ public String Url { get { - var url = ServerHost; - - url = !url.StartsWith("http://") ? "http://" + url : url; + var url = !string.IsNullOrEmpty(ServerHost) ? ServerHost : TargetHostName; url = Sitecore.StringUtil.EnsurePostfix('/', url); - url += FileName; + url += FileName; + url = DynamicSitemapHelper.EnsureHttpPrefix(url, ForceHttps); return url; } } + + public string TargetHostName { get; set; } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Model/SitemapSiteConfiguration.cs b/Sitecore.SharedSource.DynamicSitemap/Model/SitemapSiteConfiguration.cs index 2a9e979..4852e8a 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Model/SitemapSiteConfiguration.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Model/SitemapSiteConfiguration.cs @@ -4,12 +4,16 @@ using Sitecore.SharedSource.DynamicSitemap.Configuration; using Sitecore.SharedSource.DynamicSitemap.Constants; using Sitecore.SharedSource.DynamicSitemap.Interfaces; + using System; using System.Collections.Generic; using System.Linq; +using Sitecore.SharedSource.DynamicSitemap.Helpers; namespace Sitecore.SharedSource.DynamicSitemap.Model { + using static System.String; + /// /// Sitemap Site Configuration /// @@ -28,12 +32,17 @@ public class SitemapSiteConfiguration /// /// Excluded paths /// - public List ExcludedPaths { get; private set; } + public List ExcludedPaths { get; private set; } + + /// + /// Included templates + /// + public List IncludedTemplates { get; private set; } /// /// Included templates /// - public List IncludedTemplates { get; private set; } + public List IncludedBaseTemplates { get; private set; } /// /// Excluded Item paths @@ -43,7 +52,7 @@ public class SitemapSiteConfiguration /// /// Search engines /// - public List SearchEngines { get; private set; } + public List SearchEngines { get; private set; } /// /// Root Item ID @@ -68,63 +77,63 @@ public class SitemapSiteConfiguration /// /// Configuration Language /// - public String LanguageName + public string LanguageName { get { - return Language != null ? Language.Name : String.Empty; + return Language != null ? Language.Name : Empty; } } /// /// Sitemap file name /// - public String SitemapFileName { get; set; } + public string SitemapFileName { get; set; } /// /// Sitemap file path /// - public String SitemapFilePath { get; set; } + public string SitemapFilePath { get; set; } /// /// Forces generating https urls /// - public Boolean ForceHttps { get; set; } + public bool ForceHttps { get; set; } /// /// Change frequencies for templates /// - public Dictionary ChangeFrequenciesForTemplates { get; set; } + public Dictionary ChangeFrequenciesForTemplates { get; set; } /// /// Change frequencies for items /// - public Dictionary ChangeFrequenciesForItems { get; set; } + public Dictionary ChangeFrequenciesForItems { get; set; } /// /// Change frequency default value /// - public String ChangeFrequencyDefaultValue { get; private set; } + public string ChangeFrequencyDefaultValue { get; private set; } /// /// Priorities for templates /// - public Dictionary PrioritiesForTemplates { get; set; } + public Dictionary PrioritiesForTemplates { get; set; } /// /// Priorities for items /// - public Dictionary PrioritiesForItems { get; set; } + public Dictionary PrioritiesForItems { get; set; } /// /// Priority default value /// - public String PriorityDefaultValue { get; private set; } + public string PriorityDefaultValue { get; private set; } /// /// Items processor type to load /// - public String ItemsProcessorTypeToLoad { get; private set; } + public string ItemsProcessorTypeToLoad { get; private set; } /// /// Items processor @@ -139,39 +148,41 @@ public String LanguageName /// /// Sitemap /// - public String SitemapUrl + public string SitemapUrl + { + get + { + var url = TargetHost; + url += SitemapFilePath.Replace("//", "/"); + + return url; + } + } + + public string TargetHost { get { - var url = String.Empty; + var url = Empty; - if (Site.HostName == String.Empty) + if (Site.TargetHostName == Empty) { Sitecore.Links.UrlOptions urlOptions = Sitecore.Links.UrlOptions.DefaultOptions; urlOptions.LanguageEmbedding = LanguageEmbedding.Never; urlOptions.SiteResolving = true; urlOptions.Site = Site; urlOptions.AlwaysIncludeServerUrl = true; - + var startItem = _configurationItem.Database.GetItem(Site.ContentStartPath); url = Sitecore.Links.LinkManager.GetItemUrl(startItem, urlOptions); } - else { - url = !String.IsNullOrEmpty(ServerHost) - ? ServerHost - : Site.HostName; + url = !IsNullOrEmpty(ServerHost) ? ServerHost : Site.TargetHostName + '/'; } - url = url.Replace("//", "/"); - url = !url.StartsWith("http://") - ? "http://" + url - : url; - - url += SitemapFilePath.Replace("//", "/"); - + url = DynamicSitemapHelper.EnsureHttpPrefix(url, ForceHttps); return url; } } @@ -196,21 +207,25 @@ public SitemapSiteConfiguration(Item configurationItem) ServerHost = configurationItem["Server Host"]; - IncludedTemplates = !String.IsNullOrEmpty(configurationItem["Included Templates"]) - ? configurationItem["Included Templates"].Split('|').ToList() - : new List(); + IncludedBaseTemplates = !IsNullOrEmpty(configurationItem["Included Base Templates"]) + ? configurationItem["Included Base Templates"].Split('|').Select(Guid.Parse).ToList() + : new List(); + + IncludedTemplates = !IsNullOrEmpty(configurationItem["Included Templates"]) + ? configurationItem["Included Templates"].Split('|').Select(Guid.Parse).ToList() + : new List(); - ExcludedItems = !String.IsNullOrEmpty(configurationItem["Excluded Items"]) - ? configurationItem["Excluded Items"].Split('|').ToList() - : new List(); + ExcludedItems = !IsNullOrEmpty(configurationItem["Excluded Items"]) + ? configurationItem["Excluded Items"].Split('|').ToList() + : new List(); - ExcludedPaths = !String.IsNullOrEmpty(configurationItem["Excluded Paths"]) - ? configurationItem["Excluded Paths"].Split('|').ToList() - : new List(); + ExcludedPaths = !IsNullOrEmpty(configurationItem["Excluded Paths"]) + ? configurationItem["Excluded Paths"].Split('|').ToList() + : new List(); - SearchEngines = !String.IsNullOrEmpty(configurationItem["Search Engines"]) - ? configurationItem["Search Engines"].Split('|').ToList() - : new List(); + SearchEngines = !IsNullOrEmpty(configurationItem["Search Engines"]) + ? configurationItem["Search Engines"].Split('|').ToList() + : new List(); ExcludedItemPaths = new List(); @@ -242,11 +257,14 @@ public SitemapSiteConfiguration(Item configurationItem) private void ReadPriorities() { PriorityDefaultValue = _configurationItem["Default Priority"]; - - PrioritiesForTemplates = new Dictionary(); - PrioritiesForItems = new Dictionary(); - Item prioritiesFolder = _configurationItem.Database.GetItem(_configurationItem.Paths.FullPath + "/" + DynamicSitemapConfiguration.SitemapConfigurationPrioritiesFolderName); + PrioritiesForTemplates = new Dictionary(); + PrioritiesForItems = new Dictionary(); + + Item prioritiesFolder = + _configurationItem.Database.GetItem( + _configurationItem.Paths.FullPath + "/" + + DynamicSitemapConfiguration.SitemapConfigurationPrioritiesFolderName); if (prioritiesFolder != null && prioritiesFolder.HasChildren) { @@ -254,12 +272,12 @@ private void ReadPriorities() { if (item.TemplateID.ToString() == TemplateIds.PriorityForTemplatesTemplateId) { - if (item["Templates"] != String.Empty && item["Priority"] != String.Empty) + if (item["Templates"] != Empty && item["Priority"] != Empty) { var elements = item["Templates"].Split('|').ToList(); var priority = item["Priority"]; - if (priority != String.Empty) + if (priority != Empty) { foreach (var element in elements) { @@ -271,12 +289,12 @@ private void ReadPriorities() else if (item.TemplateID.ToString() == TemplateIds.PriorityForItemsTemplateId) { - if (item["Items"] != String.Empty && item["Priority"] != String.Empty) + if (item["Items"] != Empty && item["Priority"] != Empty) { var elements = item["Items"].Split('|').ToList(); var priority = item["Priority"]; - if (priority != String.Empty) + if (priority != Empty) { foreach (var element in elements) { @@ -296,14 +314,17 @@ private void ReadChangeFrequencies() { var defaultChangeFrequency = _configurationItem.Database.GetItem(_configurationItem["Change Frequency"]); - ChangeFrequencyDefaultValue = defaultChangeFrequency != null && defaultChangeFrequency["Value"] != String.Empty - ? defaultChangeFrequency["Value"] - : String.Empty; + ChangeFrequencyDefaultValue = defaultChangeFrequency != null && defaultChangeFrequency["Value"] != Empty + ? defaultChangeFrequency["Value"] + : Empty; - ChangeFrequenciesForTemplates = new Dictionary(); - ChangeFrequenciesForItems = new Dictionary(); + ChangeFrequenciesForTemplates = new Dictionary(); + ChangeFrequenciesForItems = new Dictionary(); - Item changeFrequencyFolder = _configurationItem.Database.GetItem(_configurationItem.Paths.FullPath + "/" + DynamicSitemapConfiguration.SitemapConfigurationChangeFrequenciesFolderName); + Item changeFrequencyFolder = + _configurationItem.Database.GetItem( + _configurationItem.Paths.FullPath + "/" + + DynamicSitemapConfiguration.SitemapConfigurationChangeFrequenciesFolderName); if (changeFrequencyFolder != null && changeFrequencyFolder.HasChildren) { @@ -311,7 +332,7 @@ private void ReadChangeFrequencies() { if (item.TemplateID.ToString() == TemplateIds.ChangeFrequencyForTemplatesTemplateId) { - if (item["Templates"] != String.Empty && item["Change Frequency"] != String.Empty) + if (item["Templates"] != Empty && item["Change Frequency"] != Empty) { var elements = item["Templates"].Split('|').ToList(); var changeFrequency = _configurationItem.Database.GetItem(item["Change Frequency"]); @@ -330,7 +351,7 @@ private void ReadChangeFrequencies() else if (item.TemplateID.ToString() == TemplateIds.ChangeFrequencyForItemsTemplateId) { - if (item["Items"] != String.Empty && item["Change Frequency"] != String.Empty) + if (item["Items"] != Empty && item["Change Frequency"] != Empty) { var elements = item["Items"].Split('|').ToList(); var changeFrequency = _configurationItem.Database.GetItem(item["Change Frequency"]); @@ -356,8 +377,11 @@ private void ReadChangeFrequencies() protected void ReadDynamicRoutes() { DynamicRoutes = new List(); - - Item dynamicRoutesFolder = _configurationItem.Database.GetItem(_configurationItem.Paths.FullPath + "/" + DynamicSitemapConfiguration.SitemapConfigurationRoutesFolderName); + + Item dynamicRoutesFolder = + _configurationItem.Database.GetItem( + _configurationItem.Paths.FullPath + "/" + + DynamicSitemapConfiguration.SitemapConfigurationRoutesFolderName); if (dynamicRoutesFolder != null && dynamicRoutesFolder.HasChildren) { @@ -374,7 +398,8 @@ protected void ReadDynamicRoutes() /// String public override string ToString() { - return "Sitemap configuration for site '" + Site.Name + "' (language " + Language.Name + ") - generated as " + SitemapFilePath + " (items count: " + ItemsCount + ")"; + return "Sitemap configuration for site '" + Site.Name + "' (language " + Language.Name + ") - generated as " + + SitemapFilePath + " (items count: " + ItemsCount + ")"; } /// @@ -382,9 +407,9 @@ public override string ToString() /// /// Sitecore Item /// Change frequency value - public String GetChangeFrequency(Item item) + public string GetChangeFrequency(Item item) { - String result = String.Empty; + string result = Empty; if (!ChangeFrequenciesForItems.TryGetValue(item.ID.ToString(), out result)) { @@ -402,9 +427,9 @@ public String GetChangeFrequency(Item item) /// /// Sitecore Item /// Priority value - public String GetPriority(Item item) + public string GetPriority(Item item) { - String result = String.Empty; + string result = Empty; if (!PrioritiesForItems.TryGetValue(item.ID.ToString(), out result)) { @@ -417,4 +442,4 @@ public String GetPriority(Item item) return result; } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Model/SubmissionUrlsConfig.cs b/Sitecore.SharedSource.DynamicSitemap/Model/SubmissionUrlsConfig.cs index 81127b1..a2fbdcd 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Model/SubmissionUrlsConfig.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Model/SubmissionUrlsConfig.cs @@ -18,4 +18,4 @@ public SubmissionUrlsConfig() SearchEngines = new List(); } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Model/UrlElement.cs b/Sitecore.SharedSource.DynamicSitemap/Model/UrlElement.cs index 217a315..2cd8d3a 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Model/UrlElement.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Model/UrlElement.cs @@ -19,4 +19,4 @@ public class UrlElement public String Priority { get; set; } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Modules/ItemsProcessorLoader.cs b/Sitecore.SharedSource.DynamicSitemap/Modules/ItemsProcessorLoader.cs index 9695b34..8a98a28 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Modules/ItemsProcessorLoader.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Modules/ItemsProcessorLoader.cs @@ -1,4 +1,5 @@ using Sitecore.SharedSource.DynamicSitemap.Interfaces; + using System; using System.Collections.Generic; using System.Linq; @@ -40,11 +41,10 @@ public IItemsProcessor Load(String assemblyDeclaration) catch (Exception e) { - throw; } return itemsProcessor; } } -} +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Properties/AssemblyInfo.cs b/Sitecore.SharedSource.DynamicSitemap/Properties/AssemblyInfo.cs index 08896b0..85282d2 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Properties/AssemblyInfo.cs +++ b/Sitecore.SharedSource.DynamicSitemap/Properties/AssemblyInfo.cs @@ -5,6 +5,7 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. + [assembly: AssemblyTitle("Sitecore.SharedSource.DynamicSitemap")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] @@ -17,9 +18,11 @@ // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. + [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM + [assembly: Guid("57a4efdd-889f-47cf-a47b-b65f813cb234")] // Version information for an assembly consists of the following four values: @@ -32,5 +35,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] + [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/Sitecore.SharedSource.DynamicSitemap.csproj b/Sitecore.SharedSource.DynamicSitemap/Sitecore.SharedSource.DynamicSitemap.csproj index 3ff0b90..83ca1bf 100644 --- a/Sitecore.SharedSource.DynamicSitemap/Sitecore.SharedSource.DynamicSitemap.csproj +++ b/Sitecore.SharedSource.DynamicSitemap/Sitecore.SharedSource.DynamicSitemap.csproj @@ -9,7 +9,7 @@ Properties Sitecore.SharedSource.DynamicSitemap Sitecore.SharedSource.DynamicSitemap - v4.5 + v4.5.2 512 @@ -31,8 +31,9 @@ 4 - - ..\Libraries\Sitecore.Kernel.dll + + ..\packages\Sitecore.Kernel.NoReferences.8.2.160729\lib\NET452\Sitecore.Kernel.dll + True @@ -62,11 +63,13 @@ + Designer + diff --git a/Sitecore.SharedSource.DynamicSitemap/TemplateHelper.cs b/Sitecore.SharedSource.DynamicSitemap/TemplateHelper.cs new file mode 100644 index 0000000..4d29042 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap/TemplateHelper.cs @@ -0,0 +1,31 @@ +namespace Sitecore.SharedSource.DynamicSitemap +{ + using System; + using System.Collections.Generic; + + using Sitecore.Data; + using Sitecore.Data.Items; + + public static class TemplateHelper + { + public static List GetBaseTemplates(Item item) + { + List list = new List(); + GetBaseTemplates(item.Template, list); + return list; + } + + private static void GetBaseTemplates(TemplateItem template, List list) + { + list.Add(template.ID.Guid); + foreach (TemplateItem templateItem in template.BaseTemplates) + { + if (list.Contains(templateItem.ID.Guid)) + { + continue; + } + GetBaseTemplates(templateItem, list); + } + } + } +} \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/packages.config b/Sitecore.SharedSource.DynamicSitemap/packages.config new file mode 100644 index 0000000..dd92056 --- /dev/null +++ b/Sitecore.SharedSource.DynamicSitemap/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Sitecore.SharedSource.DynamicSitemap/sitecore modules/Shell/Dynamic Sitemap XML/DynamicSitemapManager.xml b/Sitecore.SharedSource.DynamicSitemap/sitecore modules/Shell/Dynamic Sitemap XML/DynamicSitemapManager.xml index 7e9d5c8..65bec0b 100644 --- a/Sitecore.SharedSource.DynamicSitemap/sitecore modules/Shell/Dynamic Sitemap XML/DynamicSitemapManager.xml +++ b/Sitecore.SharedSource.DynamicSitemap/sitecore modules/Shell/Dynamic Sitemap XML/DynamicSitemapManager.xml @@ -1,13 +1,15 @@ - + + - + - + @@ -16,10 +18,11 @@ -