diff --git a/src/Umbraco.Core/CoreBootManager.cs b/src/Umbraco.Core/CoreBootManager.cs
index a5e9fa43cb..42fed5edce 100644
--- a/src/Umbraco.Core/CoreBootManager.cs
+++ b/src/Umbraco.Core/CoreBootManager.cs
@@ -98,6 +98,8 @@ namespace Umbraco.Core
{
CanResolveBeforeFrozen = true
};
+ //dd custom types here that are internal
+ ApplicationEventsResolver.Current.AddType();
}
///
diff --git a/src/Umbraco.Core/PublishedContentHelper.cs b/src/Umbraco.Core/PublishedContentHelper.cs
index 94fc293e4c..ec6c35891a 100644
--- a/src/Umbraco.Core/PublishedContentHelper.cs
+++ b/src/Umbraco.Core/PublishedContentHelper.cs
@@ -1,27 +1,86 @@
using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using Umbraco.Core.Configuration;
using Umbraco.Core.Dynamics;
using Umbraco.Core.PropertyEditors;
+using Umbraco.Core.Services;
namespace Umbraco.Core
{
- internal class PublishedContentHelper
- {
- ///
- /// This callback is used only so we can set it dynamically because in the "Core" project currently we don't have
- /// access to the business logic layer.
- /// TODO: Once 6.0 is released we need to change this to use the new business logic layer that we can access from
- /// this proejct. Until then this will return a Guid.Empty but the callback will need to be set in the WebBootManager
- /// to work in the website. if people use this in a non-web aspect without the WebBootManager, the the IPropertyEditorValueConverters
- /// will not be executed.
- ///
- internal static Func GetDataTypeCallback = (docTypeAlias, propertyAlias) => Guid.Empty;
- internal static Guid GetDataType(string docTypeAlias, string propertyAlias)
- {
- return GetDataTypeCallback(docTypeAlias, propertyAlias);
+ ///
+ /// Utility class for dealing with data types and value conversions
+ ///
+ ///
+ /// TODO: The logic for the GetDataType + cache should probably be moved to a service, no ?
+ ///
+ /// We inherit from ApplicationEventHandler so we can bind to the ContentTypeService events to ensure that our local cache
+ /// object gets cleared when content types change.
+ ///
+ internal class PublishedContentHelper : ApplicationEventHandler
+ {
+
+ #region event handlers to ensure that the cache is cleared when content types change
+ protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
+ {
+ ContentTypeService.SavedContentType += ContentTypeServiceSavedContentType;
+ ContentTypeService.SavedMediaType += ContentTypeServiceSavedMediaType;
+ ContentTypeService.DeletedContentType += ContentTypeServiceDeletedContentType;
+ ContentTypeService.DeletedMediaType += ContentTypeServiceDeletedMediaType;
+ }
+
+ static void ContentTypeServiceDeletedMediaType(IContentTypeService sender, Events.DeleteEventArgs e)
+ {
+ PropertyTypeCache.Clear();
+ }
+
+ static void ContentTypeServiceDeletedContentType(IContentTypeService sender, Events.DeleteEventArgs e)
+ {
+ PropertyTypeCache.Clear();
+ }
+
+ static void ContentTypeServiceSavedMediaType(IContentTypeService sender, Events.SaveEventArgs e)
+ {
+ PropertyTypeCache.Clear();
+ }
+
+ static void ContentTypeServiceSavedContentType(IContentTypeService sender, Events.SaveEventArgs e)
+ {
+ PropertyTypeCache.Clear();
+ }
+ #endregion
+
+ ///
+ /// This callback is used only for unit tests which enables us to return any data we want and not rely on having the data in a database
+ ///
+ internal static Func GetDataTypeCallback = null;
+
+ private static readonly ConcurrentDictionary, Guid> PropertyTypeCache = new ConcurrentDictionary, Guid>();
+
+ ///
+ /// Return the GUID Id for the data type assigned to the document type with the property alias
+ ///
+ ///
+ ///
+ ///
+ ///
+ internal static Guid GetDataType(ApplicationContext applicationContext, string docTypeAlias, string propertyAlias)
+ {
+ if (GetDataTypeCallback != null)
+ return GetDataTypeCallback(docTypeAlias, propertyAlias);
+
+ var key = new Tuple(docTypeAlias, propertyAlias);
+ return PropertyTypeCache.GetOrAdd(key, tuple =>
+ {
+ var result = applicationContext.Services.ContentTypeService.GetContentType(docTypeAlias);
+ if (result == null) return Guid.Empty;
+ var property = result.PropertyTypes.FirstOrDefault(x => x.Alias.InvariantEquals(propertyAlias));
+ if (property == null) return Guid.Empty;
+ return property.DataTypeId;
+ });
}
///
diff --git a/src/Umbraco.Tests/ContentStores/PublishMediaStoreTests.cs b/src/Umbraco.Tests/ContentStores/PublishMediaStoreTests.cs
index 570f73678e..cf06b08faa 100644
--- a/src/Umbraco.Tests/ContentStores/PublishMediaStoreTests.cs
+++ b/src/Umbraco.Tests/ContentStores/PublishMediaStoreTests.cs
@@ -18,11 +18,16 @@ namespace Umbraco.Tests.ContentStores
{
public override void Initialize()
{
- base.Initialize();
- //we're going to use the same initialization as the PublishedMediaTests
- PublishedMediaTests.DoInitialization(GetUmbracoContext("/test", 1234));
+ base.Initialize();
}
+ protected override void OnFreezing()
+ {
+ base.OnFreezing();
+ //we're going to use the same initialization as the PublishedMediaTests
+ PublishedMediaTests.DoInitialization(GetUmbracoContext("/test", 1234));
+ }
+
public override void TearDown()
{
base.TearDown();
diff --git a/src/Umbraco.Tests/PublishedContent/DynamicPublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/DynamicPublishedContentTests.cs
index e8bb815802..19e4ec1020 100644
--- a/src/Umbraco.Tests/PublishedContent/DynamicPublishedContentTests.cs
+++ b/src/Umbraco.Tests/PublishedContent/DynamicPublishedContentTests.cs
@@ -14,30 +14,32 @@ namespace Umbraco.Tests.PublishedContent
{
public override void Initialize()
{
- base.Initialize();
-
- PropertyEditorValueConvertersResolver.Current = new PropertyEditorValueConvertersResolver(
- new[]
+ PropertyEditorValueConvertersResolver.Current = new PropertyEditorValueConvertersResolver(
+ new[]
{
typeof(DatePickerPropertyEditorValueConverter),
typeof(TinyMcePropertyEditorValueConverter),
typeof(YesNoPropertyEditorValueConverter)
});
- //need to specify a custom callback for unit tests
- PublishedContentHelper.GetDataTypeCallback = (docTypeAlias, propertyAlias) =>
- {
- if (propertyAlias == "content")
- {
- //return the rte type id
- return Guid.Parse("5e9b75ae-face-41c8-b47e-5f4b0fd82f83");
- }
- return Guid.Empty;
- };
+ PublishedContentStoreResolver.Current = new PublishedContentStoreResolver(new DefaultPublishedContentStore());
+
+ //need to specify a custom callback for unit tests
+ PublishedContentHelper.GetDataTypeCallback = (docTypeAlias, propertyAlias) =>
+ {
+ if (propertyAlias == "content")
+ {
+ //return the rte type id
+ return Guid.Parse("5e9b75ae-face-41c8-b47e-5f4b0fd82f83");
+ }
+ return Guid.Empty;
+ };
+
+ base.Initialize();
var rCtx = GetRoutingContext("/test", 1234);
UmbracoContext.Current = rCtx.UmbracoContext;
- PublishedContentStoreResolver.Current = new PublishedContentStoreResolver(new DefaultPublishedContentStore());
+
}
public override void TearDown()
diff --git a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs
index 855a23c4c3..a94883783d 100644
--- a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs
+++ b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs
@@ -35,9 +35,16 @@ namespace Umbraco.Tests.PublishedContent
public override void Initialize()
{
base.Initialize();
- DoInitialization(GetUmbracoContext("/test", 1234));
+
}
+ protected override void OnFreezing()
+ {
+ base.OnFreezing();
+ DoInitialization(GetUmbracoContext("/test", 1234));
+ }
+
+
///
/// Shared with PublishMediaStoreTests
///
@@ -206,7 +213,6 @@ namespace Umbraco.Tests.PublishedContent
}
}
- [Ignore]
[Test]
public void Children_Without_Examine()
{
@@ -231,7 +237,6 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsTrue(subChildren.Select(x => x.Id).ContainsAll(new[] { mSubChild1.Id, mSubChild2.Id, mSubChild3.Id }));
}
- [Ignore]
[Test]
public void Descendants_Without_Examine()
{
@@ -256,7 +261,6 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsTrue(subDescendants.Select(x => x.Id).ContainsAll(new[] { mSubChild1.Id, mSubChild2.Id, mSubChild3.Id }));
}
- [Ignore]
[Test]
public void DescendantsOrSelf_Without_Examine()
{
@@ -283,7 +287,6 @@ namespace Umbraco.Tests.PublishedContent
new[] { mChild1.Id, mSubChild1.Id, mSubChild2.Id, mSubChild3.Id }));
}
- [Ignore]
[Test]
public void Parent_Without_Examine()
{
@@ -309,7 +312,7 @@ namespace Umbraco.Tests.PublishedContent
Assert.AreEqual(mChild1.Id, publishedSubChild1.Parent.Id);
}
- [Ignore]
+
[Test]
public void Ancestors_Without_Examine()
{
@@ -329,7 +332,6 @@ namespace Umbraco.Tests.PublishedContent
Assert.IsTrue(publishedSubChild1.Ancestors().Select(x => x.Id).ContainsAll(new[] {mChild1.Id, mRoot.Id}));
}
- [Ignore]
[Test]
public void AncestorsOrSelf_Without_Examine()
{
diff --git a/src/Umbraco.Tests/TestHelpers/BaseWebTest.cs b/src/Umbraco.Tests/TestHelpers/BaseWebTest.cs
index 8c07a1795c..9994399ce6 100644
--- a/src/Umbraco.Tests/TestHelpers/BaseWebTest.cs
+++ b/src/Umbraco.Tests/TestHelpers/BaseWebTest.cs
@@ -65,7 +65,6 @@ namespace Umbraco.Tests.TestHelpers
engine.CreateDatabase();
}
- Resolution.Freeze();
ApplicationContext.Current = new ApplicationContext(
//assign the db context
new DatabaseContext(new DefaultDatabaseFactory()),
@@ -79,13 +78,22 @@ namespace Umbraco.Tests.TestHelpers
//Create the umbraco database and its base data
DatabaseContext.Database.CreateDatabaseSchema();
}
-
+
+ //called so that inheritors can do stuff before freezing.
+ OnFreezing();
+
+ Resolution.Freeze();
//if (RequiresDbSetup)
// TestHelper.InitializeDatabase();
}
+ protected virtual void OnFreezing()
+ {
+
+ }
+
[TearDown]
public virtual void TearDown()
{
diff --git a/src/Umbraco.Tests/UmbracoExamine/TestContentService.cs b/src/Umbraco.Tests/UmbracoExamine/TestContentService.cs
index 0078c94a59..605f0d45ad 100644
--- a/src/Umbraco.Tests/UmbracoExamine/TestContentService.cs
+++ b/src/Umbraco.Tests/UmbracoExamine/TestContentService.cs
@@ -20,8 +20,7 @@ namespace Umbraco.Tests.UmbracoExamine
public TestContentService()
{
// TestFiles.umbraco was created by Shannon but the file is missing in Mercurial?
- //_xDoc = XDocument.Parse(TestFiles.umbraco);
- _xDoc = null;
+ _xDoc = XDocument.Parse(TestFiles.umbraco);
}
#region IContentService Members
diff --git a/src/Umbraco.Tests/UmbracoExamine/TestFiles.Designer.cs b/src/Umbraco.Tests/UmbracoExamine/TestFiles.Designer.cs
index 27ef277ca1..6fbb6df200 100644
--- a/src/Umbraco.Tests/UmbracoExamine/TestFiles.Designer.cs
+++ b/src/Umbraco.Tests/UmbracoExamine/TestFiles.Designer.cs
@@ -72,5 +72,28 @@ namespace Umbraco.Tests.UmbracoExamine {
return ResourceManager.GetString("media", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
+ ///<!DOCTYPE root[
+ ///<!ELEMENT CWS_Contact ANY>
+ ///<!ATTLIST CWS_Contact id ID #REQUIRED>
+ ///<!ELEMENT CWS_EmailAFriend ANY>
+ ///<!ATTLIST CWS_EmailAFriend id ID #REQUIRED>
+ ///<!ELEMENT CWS_EventItem ANY>
+ ///<!ATTLIST CWS_EventItem id ID #REQUIRED>
+ ///<!ELEMENT CWS_Galleries ANY>
+ ///<!ATTLIST CWS_Galleries id ID #REQUIRED>
+ ///<!ELEMENT CWS_Gallery ANY>
+ ///<!ATTLIST CWS_Gallery id ID #REQUIRED>
+ ///<!ELEMENT CWS_Home ANY>
+ ///<!ATTLIST CWS_Home id ID #REQUIRED>
+ ///<!ELEMENT CWS_NewsEventsList ANY>
/// [rest of string was truncated]";.
+ ///
+ internal static string umbraco {
+ get {
+ return ResourceManager.GetString("umbraco", resourceCulture);
+ }
+ }
}
}
diff --git a/src/Umbraco.Tests/UmbracoExamine/TestFiles.resx b/src/Umbraco.Tests/UmbracoExamine/TestFiles.resx
index d66ec6cb32..233cffeebf 100644
--- a/src/Umbraco.Tests/UmbracoExamine/TestFiles.resx
+++ b/src/Umbraco.Tests/UmbracoExamine/TestFiles.resx
@@ -121,10 +121,7 @@
testfiles\media.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Tests/UmbracoExamine/TestFiles/umbraco.config b/src/Umbraco.Tests/UmbracoExamine/TestFiles/umbraco.config
new file mode 100644
index 0000000000..9da1de847a
--- /dev/null
+++ b/src/Umbraco.Tests/UmbracoExamine/TestFiles/umbraco.config
@@ -0,0 +1,616 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]>
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ It's the KING of all CMS's, what more do you
+need to know about it?
+]]>
+ /media/171/umbraco_tshirt.jpg
+ Umbraco CMS is free
+
+It means that you are not bound and locked to the licensing
+rules about the number of content items / processors / web /
+domains, etc. Many products are very expensive as the license cost
+escalates with the number of websites. In many cases, one is soon
+up in the 500' before one can even start to implement the
+solution.
+
+Umbraco is Open Source
+
+In an Open Source product one has at any time full access to
+source code. This provides insight and leads to better quality, as
+"shortcuts" and bad code can easily be penetrated. Moreover, one
+has the ability to influence and further develop the product.
+
+Umbraco is based on open source and is therefore not
+lisence-plated or subject to an enterprise's ownership. The Umbraco
+publishing tool places great emphasis on simplicity, standards,
+flexibility and integration. Umbraco was launched in 2005 and has
+had a tremendous growth since that time. Umbraco is today among the
+most popular systems based on open source for Microsoft. NET
+platform.
+
+100% Microsoft .NET
+
+Umbraco is built 100% on the Microsoft. NET 2.0. This means that
+you can use 3rd party .NET components directly in Umbraco.
+Moreover, integration with other .NET-based solutions is well
+adapted from Umbracos part. Umbraco won an award for the
+Integration possibilities on BNP Awards 2006.
+
+Fast results
+
+Umbraco is a powerful tool with a focus on core functionality
+and openness. This efficiently allows you to achieve exactly what
+you want - rather than be restricted to a "finished" module, which
+makes only half of what you really wanted.
+
+Easy-to-use
+
+Umbraco has a focus on content and facilitate rapid and
+intuitive content management. The system strives to be elegant,
+usable and effective.
+
+Based on standards
+
+Umbraco is based on standards from the W3C as XHTML, CSS, XML
+and XSLT. This gives a greater flexibility and independence, which
+in turn provides more value for the money.
+
+Integration
+
+Umbraco is known to be among the best CMS on integration. Much
+of the reason for this is the way to expose Microsoft ASP.NET
+components as elements of, or so-called "macro's" for use in
+templates, as well as in the WYSIWYG editor that writers and
+editors use. Elements is also possible to "cache" on several levels
+and is based on standard Microsoft .NET technology. Below are some
+examples:
+
+
+- External XML sources (ex RSS) can be directly implemented via
+XSLT elements (macros).
+
+- ASP.NET controls that retrieve data from external or internal
+posterior systems via standard Web Services.
+
+
+
+
+
+]]>
+
+
+ /media/227/warren-buckley.jpg
+ /media/228/sam-grady.jpg
+ Sam Grady
+
+Sam Grady, me, is a graphic designer. I loves graphic design.
+Great graphic design and simple solutions makes this man very
+happy. Photography is also very close to my heart and I'd like to
+be better, so I practice a lot and annoy people with my
+requests.
+
+ I haven't got a blog, yet, don't Twitter and cancelled my Facebook
+account as I felt uncomfortable with people knowing my business.
+Anyone else feel that way? I do, however, have a Flickr account, so
+go check it out: www.flickr.com/photos/mrgrady
+
+ I also have my own business, G72, which has a website that
+desperately needs updating. Also, as of today (03/03/09), it's
+currently down due to inept web hosts. Hopefully it won't be if you
+want to take a look: www.g-72.co.uk
+
+ Regarding this project, Warren asked me if I wanted to design his
+website starter package for the fantastic Umbraco CMS, which I
+jumped at the chance to do. Hopefully you'll find the design
+appropriate and the package very useful, as that's what we really
+want from this project.
+
+ Finally, Warren says the layout is work in progress and I have a,
+typically fussy, list of designer layout requests that I've asked
+Warren to do, but time being what it is, these changes won't be
+made on version 2.0, so if you spot anything, do mail the man as
+we'll be compiling a list of tweaks to be made.
+
+ Enjoy.
+]]>
+ Warren Buckley
+
+Warren Buckley is a web developer who specialises in using the
+Umbraco CMS platform to build content managed websites for Xeed in
+Norway. I run a blog called Creative Web
+Specialist, where I mainly write tips and tutorial articles
+around Umbraco.
+
+I have teamed up with ex-collegue Sam Grady to help me design
+the new version of CWS as he produces wonderfully sexy designs for
+the web. If you have seen my previous version/s of CWS you will
+know that my design skills are far from stunning.
+
+I decided to create this website starter site nicknamed CWS
+(Creative Website Starter site) as a learning tool to help you
+understand how all the elements of a site work together in
+Umbraco.
+
+From this NEW CWS package comes the
+following:
+
+
+- Obviously a BRAND NEW spanking design from
+ex-collegue Sam Grady of G-72
+
+- A focus for this site to be used to help teach new users to the
+Umbraco CMS platform.
+
+- .NET usercontrols written in C#
+
+- XSLT & .NET code heavily commented to help understand what
+is going on.
+
+- With supporting documentation coming in the near future.
+
+
+Want to see where else you can find me on the net?
+ Blog - www.creativewebspecialist.co.uk
+ Flickr - www.flickr.com/photos/warrenbuckley
+ Last.FM - www.last.fm/user/warrenbuckley
+ Twitter - twitter.com/warrenbuckley
+]]>
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 3
+ 4
+ 5
+
+
+
+
+
+ 0
+ This website has been produced to help you understand
+Umbraco.
+]]>
+
+
+
+
+
+
+ 0
+ This is a good place to put a service message or something to help define your site or company.]]>
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ullamcorper condimentum lorem. Curabitur placerat nunc ut leo. Integer eros ligula, vestibulum at, eleifend id, dignissim vel, est.
+Fusce tristique. Cras faucibus porta nunc. Aliquam ultrices, arcu quis ornare sagittis, lectus augue ornare nulla, eu lobortis velit lectus id nibh. Aliquam condimentum aliquet purus. Quisque blandit ante non sapien. Sed justo libero, sollicitudin ac, pretium et, luctus nec, nisl. Nulla semper neque nec magna. Cras ut nibh ut urna bibendum sodales. Quisque venenatis euismod lacus. Pellentesque dapibus turpis at urna.
+Sub Header
+Sed scelerisque adipiscing mauris. Mauris egestas dapibus quam. Integer in libero eget eros dignissim pretium. Proin luctus sem nec lorem. Praesent lorem. Vivamus eget nunc quis sapien condimentum egestas. Maecenas facilisis, nunc at sodales facilisis, quam magna pretium nibh, vel ultrices lectus lorem quis neque. Nam sit amet leo ac lectus gravida convallis. Phasellus at enim vel dui porta porttitor. Morbi id dolor adipiscing erat egestas consequat.
+Phasellus diam. Morbi dolor. Donec consequat sodales nunc. Nam dapibus lectus id lectus. Sed ultrices metus sit amet est. Morbi porttitor. Proin vel risus. Phasellus sodales convallis justo. Sed luctus hendrerit risus. Sed est lorem, feugiat et, rutrum quis, condimentum non, nunc. Aenean urna leo, sagittis a, commodo eget, lobortis nec, eros. Vivamus pharetra, lectus eu ultrices pulvinar, nunc quam consectetur nibh, sed pulvinar leo dolor ut felis.
+
+- Item one
+- Item two
+- Item three
+
+Nullam lobortis, mi nec feugiat congue, dolor diam cursus lacus, a elementum ligula dolor vitae sem. Suspendisse at quam. Praesent neque. Vestibulum at justo. Nulla rutrum velit et eros.
+
+- Integer convallis augue in tellus
+- Magna quam sollicitudin mauris
+
+Nullam lobortis, mi nec feugiat congue, dolor diam cursus lacus, a elementum ligula dolor vitae sem. Suspendisse at quam.
]]>
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ The Bookhouse Boys. Live at the ICA, London.
+]]>
+
+
+ /media/1239/bookhouse-boys_gallery.jpg
+
+ Credit: Sam Grady
+ /media/1277/bookhouse-boys_3.jpg
+ /media/1314/bookhouse-boys_3_thumb.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+ Credit: Sam Grady
+ /media/1250/bookhouse-boys_1.jpg
+ /media/1296/bookhouse-boys_1_thumb.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+ Credit: Sam Grady
+ /media/1331/bookhouse-boys_2.jpg
+ /media/1350/bookhouse-boys_2_thumb.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ Where all the great minds of umbraco meet!
+]]>
+
+
+ /media/993/codegarden-08_gallery.jpg
+
+ Credit: Douglas Robar
+ /media/825/darren-ferguson_david-conlisk.jpg
+ /media/835/darren-ferguson_david-conlisk_thumb.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+ Credit: Warren Buckley
+ /media/394/codegarden08-t-shirt.jpg
+ /media/799/codegarden08-t-shirt_thumb.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+ Credit: Douglas Robar
+ /media/852/bingo-callers.jpg
+ /media/871/bingo-callers_thumb.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+ Credit: Douglas Robar
+ /media/879/christian-palm.jpg
+ /media/889/christian-palm_thumb.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ Photos from a trip to Bath in November 2008
+]]>
+
+
+ /media/935/bath_gallery.jpg
+
+ Credit: Warren Buckley
+ /media/995/royal-crescent.jpg
+ /media/1014/royal-crescent_thumb.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+ 0
+ This first page displays all the albums featured within your site.
Please have a browse through.]]>
+
+
+
+
+
+ 2009-06-22T00:00:00
+ Come join the annual umbraco developer conference in Wonderful
+Copenhagen on June 22nd - 23rd. Two days for insights, eye-openers,
+great conversations and friendly people.
+
+The who's who of umbraco will be gathered and share their
+knowledge through talks, tutorials and via un-conference formats
+like open space or hacking sessions. We have booked a cool, old and
+huge industrial venue in central Copenhagen where we'll have one
+huge room, three rooms for breakout sessions and a Café that
+serves your taste of espresso.
+
+Come join the annual umbraco developer conference in Wonderful
+Copenhagen on June 22nd - 23rd. Two days for insights, eye-openers,
+great conversations and friendly people.
+
+We've planned a program that fits both experienced umbraco users
+as well as new comers. The conference is kicked off with a Keynote
+and after that we'll have two or three tracks of sessions and the
+first day is rounded with an open Q/A session with the umbraco core
+team.
+
+The second day features an un-conference format called open
+space, which we also used with great success at last year's
+conference. It's a format where everybody can suggest a topic and
+as we have plenty of break-out rooms rest assured that there'll be
+room for your topic as well. Last year's more than 20 topics
+covered Silverlight, High performance websites with umbraco,
+building custom data types and much more.
+
+But it doesn't ends there. We've ensured that we can stay at the
+venue until midnight both days which means that when the first day
+ends, the fun begins. With more than hundred people gathered at a
+place with loads of umbraco knowledge, wifi, great food and plenty
+of space, who knows what could happen. A BBQ, new packages,
+improvised demos and talks, or...?
+
+
+]]>
+ /media/445/umbraco_tshirt.jpg
+
+
+
+
+
+
+
+
+ 0
+
+
+ After Warren Buckley's success of the first Creative Website
+Starter site package, with over 20K downloads he has decided to
+work on CWS2.
+
+As of today Wednesday the 4th March 2009, the CWS2 package is
+now available to download from the built in package repository
+inside Umbraco.
+
+With this new version comes the following:
+
+
+- A BRAND NEW spanking design from ex-collegue
+Sam Grady of G-72
+
+- A focus for this site to be used to help teach new users to the
+Umbraco CMS platform.
+
+- .NET usercontrols written in C#
+
+- XSLT & .NET code heavily commented to help understand what
+is going on.
+
+- With supporting documentation coming in the near future.
+
+]]>
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+ 0
+
+
+ Please browse through our news archive and event listings
+below.
+]]>
+
+
+ you@yourcompany.co.uk
+ Email from Contact form on website
+
+ you@yourcompany.co.uk
+ Thank you for your message
+
+ 0
+
+
+
+
+
+ 0
+ Everything you need to
+ get in touch.
+]]>
+ Enquiry Form
+
+If you have a particular enquiry, please fill out the form below
+and provide as much information as you can, so that one of our
+representatives can deal with your enquiry as effciently as
+possible.
+]]>
+ Thank you. We will be in touch shortly.
+]]>
+ Thanks for filling out our contact form we will get back to you
+shortly.
+
+Regards,
+ My Company
+]]>
+
+
+ you@yourcompany.co.uk
+ [YourName] has sent you a link to read
+
+ 0
+
+
+
+
+
+ 1
+ Send a page onto your friend.]]>
+ Thank you. We appreciate the love you are giving our site.]]>
+ Thanks for sending that link onto your friend, we really appreciate it here at My Company.]]>
+
+
+
+ 0
+ Your logo/name
+ Sam Grady designed this for Warren Buckley. "This" idea was first created by the incredible Robert Brownjohn and has been copied many times since.]]>
+
+ Thank you for installing the umbraco website package created and developed by Warren Buckley. This should website package be used to help you understand how all the components of an Umbraco site works.
+
]]>
+
+
+
+ 0
+
+
\ No newline at end of file
diff --git a/src/Umbraco.Web/Models/DynamicPublishedContent.cs b/src/Umbraco.Web/Models/DynamicPublishedContent.cs
index 295cb0ffcf..d77303b4cd 100644
--- a/src/Umbraco.Web/Models/DynamicPublishedContent.cs
+++ b/src/Umbraco.Web/Models/DynamicPublishedContent.cs
@@ -194,7 +194,10 @@ namespace Umbraco.Web.Models
}
//get the data type id for the current property
- var dataType = Umbraco.Core.PublishedContentHelper.GetDataType(userProperty.DocumentTypeAlias, userProperty.Alias);
+ var dataType = Umbraco.Core.PublishedContentHelper.GetDataType(
+ ApplicationContext.Current,
+ userProperty.DocumentTypeAlias,
+ userProperty.Alias);
//convert the string value to a known type
var converted = Umbraco.Core.PublishedContentHelper.ConvertPropertyValue(result, dataType, userProperty.DocumentTypeAlias, userProperty.Alias);
diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs
index eb16b91194..21d1568124 100644
--- a/src/Umbraco.Web/PublishedContentExtensions.cs
+++ b/src/Umbraco.Web/PublishedContentExtensions.cs
@@ -151,7 +151,7 @@ namespace Umbraco.Web
//Here we need to put the value through the IPropertyEditorValueConverter's
//get the data type id for the current property
- var dataType = PublishedContentHelper.GetDataType(doc.DocumentTypeAlias, alias);
+ var dataType = PublishedContentHelper.GetDataType(ApplicationContext.Current, doc.DocumentTypeAlias, alias);
//convert the string value to a known type
var converted = PublishedContentHelper.ConvertPropertyValue(p.Value, dataType, doc.DocumentTypeAlias, alias);
return converted.Success
@@ -186,7 +186,7 @@ namespace Umbraco.Web
//before we try to convert it manually, lets see if the PropertyEditorValueConverter does this for us
//Here we need to put the value through the IPropertyEditorValueConverter's
//get the data type id for the current property
- var dataType = PublishedContentHelper.GetDataType(prop.DocumentTypeAlias, alias);
+ var dataType = PublishedContentHelper.GetDataType(ApplicationContext.Current, prop.DocumentTypeAlias, alias);
//convert the value to a known type
var converted = PublishedContentHelper.ConvertPropertyValue(p.Value, dataType, prop.DocumentTypeAlias, alias);
object parsedLinksVal;
diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs
index cb1a765bee..d320086445 100644
--- a/src/Umbraco.Web/UmbracoContext.cs
+++ b/src/Umbraco.Web/UmbracoContext.cs
@@ -39,7 +39,6 @@ namespace Umbraco.Web
///
///
///
- ///
internal UmbracoContext(
HttpContextBase httpContext,
ApplicationContext applicationContext)
diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs
index cb52a8dc5e..3ccb98c2b5 100644
--- a/src/Umbraco.Web/WebBootManager.cs
+++ b/src/Umbraco.Web/WebBootManager.cs
@@ -169,11 +169,7 @@ namespace Umbraco.Web
protected override void InitializeResolvers()
{
base.InitializeResolvers();
-
- //TODO: This needs to be removed in future versions (i.e. 6.0 when the PublishedContentHelper can access the business logic)
- // see the TODO noted in the PublishedContentHelper.
- PublishedContentHelper.GetDataTypeCallback = ContentType.GetDataType;
-
+
SurfaceControllerResolver.Current = new SurfaceControllerResolver(
PluginManager.Current.ResolveSurfaceControllers());