+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /bin/Umbraco.PoetPatcher.dll
+ /umbraco/plugins/PoetPatcher/CustomError.aspx
+ /umbraco/plugins/PoetPatcher/Guide.pdf
+ /umbraco/plugins/PoetPatcher/patch.ascx
+
+
+
+
+
+
+
+
+
+ Umbraco Commercial License
+ Umbraco Corp
+ Thank you for installing Contour - the tool that makes creating contact forms, entry forms and questionnaires just as easy as using Word.
+
+
+
IMPORTANT: This installer will need modify rights to folders: /bin, /umbraco, /usercontrols and the web.config,
+ as well as be allowed to create tables in the database to be able to perform the following changes:
+
+
+
Install the Contour Database schema
+
Modify the web.config if needed
+
Add the contour application to the current user
+
Add the Contour xslt library
+
Modify the /umbraco/config/create/ui.xml file
+
+
+
+ If your permissions or other settings is in conflict with the above changes, we advice you to use the manual installation which is available
+ from the same location you downloaded this package from.
+
+ ]]>
+
+
+
+
+
+
+
+ Umbraco Contour
+
+
+
+
+
+
+
+
+
+
+
+
+ 89
+
+ /bin/AjaxControlToolkit.dll
+ /bin/Fizzler.dll
+ /bin/Fizzler.Systems.HtmlAgilityPack.dll
+ /bin/HtmlAgilityPack.dll
+ bin/Umbraco.Forms.Core.dll
+ /bin/Umbraco.Forms.Core.pdb
+ /bin/Umbraco.Forms.UI.dll
+ /bin/Umbraco.Forms.UI.pdb
+ /bin/Umbraco.Licensing.dll
+ /umbraco/images/tray/contour.png
+ /umbraco/images/umbraco/icon_archive.png
+ /umbraco/images/umbraco/icon_datasource.gif
+ /umbraco/images/umbraco/icon_entries.gif
+ /umbraco/images/umbraco/icon_exportform.gif
+ /umbraco/images/umbraco/icon_form.gif
+ /umbraco/images/umbraco/icon_importform.gif
+ /umbraco/images/umbraco/icon_prevaluesource.gif
+ /umbraco/images/umbraco/icon_workflow.gif
+ /umbraco/plugins/umbracoContour/css/img/add.png
+ /umbraco/plugins/umbracoContour/css/img/add_small.png
+ /umbraco/plugins/umbracoContour/css/img/bullet_arrow_down.png
+ /umbraco/plugins/umbracoContour/css/img/bullet_arrow_up.png
+ /umbraco/plugins/umbracoContour/css/img/contextMenuBg.gif
+ /umbraco/plugins/umbracoContour/css/img/copy_small.png
+ /umbraco/plugins/umbracoContour/css/img/datasource_small.png
+ /umbraco/plugins/umbracoContour/css/img/delete.png
+ /umbraco/plugins/umbracoContour/css/img/delete_small.png
+ /umbraco/plugins/umbracoContour/css/img/edit.png
+ /umbraco/plugins/umbracoContour/css/img/edit_small.png
+ /umbraco/plugins/umbracoContour/css/img/entries.png
+ /umbraco/plugins/umbracoContour/css/img/options.png
+ /umbraco/plugins/umbracoContour/css/img/workflow.png
+ /umbraco/plugins/umbracoContour/css/img/x.png
+ /umbraco/plugins/umbracoContour/css/datatables.css
+ /umbraco/plugins/umbracoContour/css/dd.css
+ /umbraco/plugins/umbracoContour/css/dd_arrow.gif
+ /umbraco/plugins/umbracoContour/css/defaultform.css
+ /umbraco/plugins/umbracoContour/css/dialogs.css
+ /umbraco/plugins/umbracoContour/css/style.css
+ /umbraco/plugins/umbracoContour/css/TableTools.css
+ /umbraco/plugins/umbracoContour/images/fieldtypes/checkbox.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/checkboxlist.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/datepicker.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/dropdownlist.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/hiddenfield.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/passwordfield.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/radiobuttonlist.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/textarea.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/textfield.png
+ /umbraco/plugins/umbracoContour/images/fieldtypes/upload.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/approve.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/copy.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/copy_hover.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/csv.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/csv_hover.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/delete.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/edit.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/print.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/print_hover.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/xls.png
+ /umbraco/plugins/umbracoContour/images/recordviewericons/xls_hover.png
+ /umbraco/plugins/umbracoContour/images/back.png
+ /umbraco/plugins/umbracoContour/images/Calendar.png
+ /umbraco/plugins/umbracoContour/images/down-arrow.gif
+ /umbraco/plugins/umbracoContour/images/drag.png
+ /umbraco/plugins/umbracoContour/images/forward.png
+ /umbraco/plugins/umbracoContour/images/icon_bug.gif
+ /umbraco/plugins/umbracoContour/images/icon_export.gif
+ /umbraco/plugins/umbracoContour/images/icon_field.gif
+ /umbraco/plugins/umbracoContour/images/icon_fieldset.gif
+ /umbraco/plugins/umbracoContour/images/icon_page.gif
+ /umbraco/plugins/umbracoContour/images/icon_preview.gif
+ /umbraco/plugins/umbracoContour/images/icon_workflow.gif
+ /umbraco/plugins/umbracoContour/images/sort_asc.png
+ /umbraco/plugins/umbracoContour/images/sort_both.png
+ /umbraco/plugins/umbracoContour/images/sort_dsc.png
+ /umbraco/plugins/umbracoContour/scripts/designsurface.js
+ /umbraco/plugins/umbracoContour/scripts/jquery-1.3.2.min.js
+ /umbraco/plugins/umbracoContour/scripts/jquery-ui-1.7.2.custom.min.js
+ /umbraco/plugins/umbracoContour/scripts/jquery.datatables.js
+ /umbraco/plugins/umbracoContour/scripts/jquery.dd.js
+ /umbraco/plugins/umbracoContour/scripts/jquery.inlineedit.js
+ /umbraco/plugins/umbracoContour/scripts/jquery.jfeed.pack.js
+ /umbraco/plugins/umbracoContour/scripts/jquery.simplemodal-1.2.3.js
+ /umbraco/plugins/umbracoContour/scripts/jquery.validate.js
+ /umbraco/plugins/umbracoContour/scripts/TableTools.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.designsurface.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.documentmapper.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.editformpage.eventhandlers.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.eventhandlers.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.fieldmapper.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.formpickercreateformdialog.eventhandlers.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.limitedmode.js
+ /umbraco/plugins/umbracoContour/scripts/umbracoforms.readonlymode.js
+ /umbraco/plugins/umbracoContour/scripts/ZeroClipboard.js
+ /umbraco/plugins/umbracoContour/scripts/ZeroClipboard.swf
+ /umbraco/plugins/umbracoContour/templates/Comment form.ucf
+ /umbraco/plugins/umbracoContour/templates/Contact form.ucf
+ /umbraco/plugins/umbracoContour/tinymce/insertForm.aspx
+ /umbraco/plugins/umbracoContour/webservices/RecordActions.aspx
+ /umbraco/plugins/umbracoContour/webservices/Records.aspx
+ /umbraco/plugins/umbracoContour/xslt/DataTables_json.xslt
+ /umbraco/plugins/umbracoContour/xslt/excel.xslt
+ /umbraco/plugins/umbracoContour/xslt/Html.xslt
+ /umbraco/plugins/umbracoContour/xslt/postAsXmlSample.xslt
+ /umbraco/plugins/umbracoContour/xslt/sendXsltEmailSample.xslt
+ /umbraco/plugins/umbracoContour/xslt/xml.xslt
+ /umbraco/plugins/umbracoContour/Analyzer.aspx
+ /umbraco/plugins/umbracoContour/archiveForm.aspx
+ /umbraco/plugins/umbracoContour/createForm.ascx
+ /umbraco/plugins/umbracoContour/createFormFromDataSourceDialog.aspx
+ /umbraco/plugins/umbracoContour/Designer.asmx
+ /umbraco/plugins/umbracoContour/editDataSource.aspx
+ /umbraco/plugins/umbracoContour/editForm.aspx
+ /umbraco/plugins/umbracoContour/editFormEntries.aspx
+ /umbraco/plugins/umbracoContour/editFormsSecurity.aspx
+ /umbraco/plugins/umbracoContour/editFormWorkflows.aspx
+ /umbraco/plugins/umbracoContour/editPrevalueProvider.aspx
+ /umbraco/plugins/umbracoContour/editPrevalues.aspx
+ /umbraco/plugins/umbracoContour/editPrevalueSource.aspx
+ /umbraco/plugins/umbracoContour/editWorkflow.aspx
+ /umbraco/plugins/umbracoContour/editWorkflowDialog.aspx
+ /umbraco/plugins/umbracoContour/executeRecordAction.aspx
+ /umbraco/plugins/umbracoContour/exportForm.aspx
+ /umbraco/plugins/umbracoContour/ExportFormEntries.aspx
+ /umbraco/plugins/umbracoContour/exportFormEntriesDialog.aspx
+ /umbraco/plugins/umbracoContour/FeedProxy.aspx
+ /umbraco/plugins/umbracoContour/FileProxy.aspx
+ /umbraco/plugins/umbracoContour/formPickerChooseFormDialog.aspx
+ /umbraco/plugins/umbracoContour/formPickerCreateFormDialog.aspx
+ /umbraco/plugins/umbracoContour/formPickerDialog.aspx
+ /umbraco/plugins/umbracoContour/Forms.asmx
+ /umbraco/plugins/umbracoContour/FormsDashboard.ascx
+ /umbraco/plugins/umbracoContour/importForm.aspx
+ /umbraco/plugins/umbracoContour/previewFormDialog.aspx
+ /umbraco/plugins/umbracoContour/test.asmx
+ /umbraco/plugins/umbracoContour/UmbracoContour.config
+ /umbraco/plugins/umbracoContour/Workflows.asmx
+ /umbraco/xslt/templates/Schema2/UmbracoContourListComments.xslt
+ /umbraco/xslt/templates/UmbracoContourListComments.xslt
+ /usercontrols/umbracoContour/EditForm.ascx
+ /usercontrols/umbracoContour/Installer.ascx
+ /usercontrols/umbracoContour/RenderForm.ascx
+
+
+
+
+
+
+
+
+
+ Umbraco Commercial License
+ Umbraco HQ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /bin/Antlr3.Runtime.dll
+ /bin/Castle.Core.dll
+ /bin/Castle.Core.xml
+ /bin/Castle.DynamicProxy2.dll
+ /bin/Castle.DynamicProxy2.xml
+ /bin/FluentNHibernate.dll
+ /bin/FluentNHibernate.pdb
+ /bin/FluentNHibernate.xml
+ /bin/Iesi.Collections.dll
+ /bin/log4net.dll
+ /bin/NHibernate.ByteCode.Castle.dll
+ /bin/NHibernate.ByteCode.Castle.xml
+ /bin/NHibernate.dll
+ /bin/NHibernate.xml
+ bin/Umbraco.Courier.Core.dll
+ /bin/Umbraco.Courier.Core.pdb
+ /bin/Umbraco.Courier.DataResolvers.dll
+ /bin/Umbraco.Courier.DataResolvers.pdb
+ /bin/Umbraco.Courier.Persistence.V4.NHibernate.dll
+ /bin/Umbraco.Courier.Persistence.V4.NHibernate.pdb
+ /bin/Umbraco.Courier.Providers.dll
+ /bin/Umbraco.Courier.Providers.pdb
+ /bin/Umbraco.Courier.RepositoryProviders.dll
+ /bin/Umbraco.Courier.RepositoryProviders.pdb
+ /bin/Umbraco.Courier.UI.dll
+ /bin/Umbraco.Courier.UI.pdb
+ /bin/Umbraco.Licensing.dll
+ /bin/Umbraco.Licensing.pdb
+ /config/courier.config
+ /umbraco/images/tray/courier.jpg
+ /umbraco/plugins/courier/css/img/x.png
+ /umbraco/plugins/courier/css/dialogs.css
+ /umbraco/plugins/courier/css/pages.css
+ /umbraco/plugins/courier/css/style.css
+ /umbraco/plugins/courier/dashboard/CourierDashboard.ascx
+ /umbraco/plugins/courier/dialogs/addItemsToLocalRevision.aspx
+ /umbraco/plugins/courier/dialogs/CommitItem.aspx
+ /umbraco/plugins/courier/dialogs/ResourceBrowser.aspx
+ /umbraco/plugins/courier/dialogs/transferItem.aspx
+ /umbraco/plugins/courier/dialogs/transferRevision.aspx
+ /umbraco/plugins/courier/dialogs/UpdateItem.aspx
+ /umbraco/plugins/courier/images/bug.gif
+ /umbraco/plugins/courier/images/courier.jpg
+ /umbraco/plugins/courier/images/Courier.png
+ /umbraco/plugins/courier/images/deploy.gif
+ /umbraco/plugins/courier/images/edit.png
+ /umbraco/plugins/courier/images/extract.png
+ /umbraco/plugins/courier/images/install.png
+ /umbraco/plugins/courier/images/package.gif
+ /umbraco/plugins/courier/images/package_all.gif
+ /umbraco/plugins/courier/images/package_selection.gif
+ /umbraco/plugins/courier/images/transfer.gif
+ /umbraco/plugins/courier/images/transfer.png
+ /umbraco/plugins/courier/masterpages/CourierDialog.Master
+ /umbraco/plugins/courier/masterpages/CourierPage.Master
+ /umbraco/plugins/courier/pages/deployRevision.aspx
+ /umbraco/plugins/courier/pages/deployRevisions.aspx
+ /umbraco/plugins/courier/pages/editCourierSecurity.aspx
+ /umbraco/plugins/courier/pages/editLocalRevision.aspx
+ /umbraco/plugins/courier/pages/editRemoteRevision.aspx
+ /umbraco/plugins/courier/pages/editRepository.aspx
+ /umbraco/plugins/courier/pages/extractRevision.aspx
+ /umbraco/plugins/courier/pages/feedproxy.aspx
+ /umbraco/plugins/courier/pages/LicenseError.aspx
+ /umbraco/plugins/courier/pages/status.aspx
+ /umbraco/plugins/courier/pages/ViewRepositories.aspx
+ /umbraco/plugins/courier/pages/ViewRevision.aspx
+ /umbraco/plugins/courier/pages/ViewRevisionDetails.aspx
+ /umbraco/plugins/courier/pages/ViewRevisions.aspx
+ /umbraco/plugins/courier/scripts/courier.js
+ /umbraco/plugins/courier/scripts/jquery.simplemodal-1.2.3.js
+ /umbraco/plugins/courier/scripts/RevisionDetails.js
+ /umbraco/plugins/courier/usercontrols/DependencySelector.ascx
+ /umbraco/plugins/courier/usercontrols/Installer.ascx
+ /umbraco/plugins/courier/usercontrols/ProviderSecurity.ascx
+ /umbraco/plugins/courier/usercontrols/RevisionContentsOverview.ascx
+ /umbraco/plugins/courier/usercontrols/SystemItemSelector.ascx
+ /umbraco/plugins/courier/usercontrols/test.ascx
+ /umbraco/plugins/courier/webservices/Courier.asmx
+ /umbraco/plugins/courier/webservices/Packager.asmx
+ /umbraco/plugins/courier/webservices/Repository.asmx
+ /umbraco/plugins/courier/deployRevision.aspx
+ /umbraco/plugins/courier/deployRevisions.aspx
+ /umbraco/plugins/courier/editCourierSecurity.aspx
+ /umbraco/plugins/courier/editLocalRevision.aspx
+ /umbraco/plugins/courier/editRemoteRevision.aspx
+ /umbraco/plugins/courier/editRepository.aspx
+ /umbraco/plugins/courier/extractRevision.aspx
+ /umbraco/plugins/courier/feedproxy.aspx
+ /umbraco/plugins/courier/LicenseError.aspx
+ /umbraco/plugins/courier/status.aspx
+ /umbraco/plugins/courier/ViewRepositories.aspx
+ /umbraco/plugins/courier/ViewRevision.aspx
+ /umbraco/plugins/courier/ViewRevisionDetails.aspx
+ /umbraco/plugins/courier/ViewRevisions.aspx
+
+
+
+
+
+
+
+
+
+ MIT license
+ Peter
+
+
+
+
+
+
+
+ 49904
+
+
+
+
+ 130
+
+ /macroScripts/GoogleDevGroupRSS.cshtml
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/Samples/Editor.md b/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/Samples/Editor.md
new file mode 100644
index 00000000..e69de29b
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/Samples/PropertyEditor.md b/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/Samples/PropertyEditor.md
new file mode 100644
index 00000000..5f97d521
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/Samples/PropertyEditor.md
@@ -0,0 +1 @@
+# Sample Property Editor
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/Structure.md b/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/Structure.md
new file mode 100644
index 00000000..c7acf98d
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/Structure.md
@@ -0,0 +1,61 @@
+# Structure
+
+_Belle introduces a new default location for all client files like JS, CSS and related assets._
+
+
+## /umbraco/Client
+The mother folder, containing all sub folders related to the client. If you have any files related to the UI
+or a UI component, they should be placed here and afterwards loaded with clientdependency.
+
+### Subfolders
+Inside /umbraco/Client, is a number of subfolders, which are described below
+
+
+## /Lib
+Library folder, which contains all 3rd party libraries used by umbraco. such as JQuery and TinyMCE. Each library
+has it's own folder, but beyond that it follows the library's own folder structure for easy copy-paste updates.
+All files in the this folder must remain *unchanged* as these will get upgraded with new versions and no-one will check
+for customizations.
+
+## /Modules
+Contains individual UI components, grouped by a namespace and module name. A module is basicly a group of js, css and image files, used
+by this module, so everything is in one place for that specific component, and thereby easier to load dependencies into the browser.
+*The /Modules folder is devided into subfolders:*
+
+
+#### /Modules/Umbraco.Application
+Modules used by the application in generel, such as the tree, search, popovers and so on.
+
+#### /Modules/Umbraco.PropertyEditors
+Modules used by individual property editors / data types. Like the Content Picker, Date picker etc. Each module contains the js and css files for
+that module, but not any dependencies, these are still located in /Lib
+
+#### /Modules/Umbraco.Editors
+Modules / classes used by individual editor pages, so for exemple editTemplates.aspx has all its clientside logic in
+/Modules/Umbraco.Editors/Settings/editTemplate.js
+
+#### /Modules/Umbraco.Utills
+Utility classes which are available on all pages
+
+#### /Modules/Umbraco.System
+Underlying System classes currently used for the NameSpace Manager and History manager
+
+## /Css
+Contains the main stylesheets for the application, currently it contains:
+
+- *login.css* only used on the login.aspx page
+- *application.css* which is only used by the main window
+- *page.css* added on all pages
+- *dialog.css* only added to pages which uses the dialog masterpage
+
+*Also: * the default stylesheet from twitter bootstrap is available on all pages
+
+For anything else, css should be placed in its relevant module folder *Notice:* this is not the case YET, but what we try to get to.
+
+## /Js
+This folder is legacy and will at some point be removed, please use /modules if you need to add some javascript to the application to hook into
+the page load event use /modules/umbraco.editors/default.js which is loaded on all pages and /Modules/Umbraco.Application/window to hook into the
+general application window.
+
+## /img
+For any non-css images
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/index.md b/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/index.md
new file mode 100644
index 00000000..a2529bde
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/Belle/index.md
@@ -0,0 +1,38 @@
+#Project "Belle"
+
+_"Belle" is the codename for the next version of the Umbraco backoffice UI._
+
+After 10 years as an open source project, the UI has barely changed. There has been tweaks here and there, but overall
+the experience of using Umbraco, has stayed the same.
+
+Project Belle intends to overhaul the entire UI with a simpler visual theme, and at the same time, replacing most of the internal code.
+
+
+
+###Getting belle up and running
+
+Currently there are 2 ways, either get it from nightly.umbraco.org and run it as a normal umbraco installation, or build it from source.
+
+####From nightly
+To download from nightly, download a zip of the latest build here:
+
+http://nightly.umbraco.org/umbraco%20belle/
+
+Files named UmbracoCms.4.11.0.build.*.zip are the complete website package
+
+Unzip the files to disk and use either IIS or IIS express to run the site.
+
+
+####From source
+At the moment, we host the belle source at a seperate repository here:
+
+https://bitbucket.org/UmbracoHQ/umbracocms-belleui
+
+To get the source, open cmd.exe in a directory and enter:
+
+ hg clone https://bitbucket.org/UmbracoHQ/umbracocms-belleui
+
+This will download the source and you can open it in visual studio and run it from there.
+
+
+
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/index.md b/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/index.md
new file mode 100644
index 00000000..21c8fe56
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/index.md
@@ -0,0 +1,12 @@
+#Coding standards and naming conventions
+
+_Coding standards and naming conventions for all languages used in the Umbraco core_
+
+##[Naming conventions](naming-conventions.md)
+The naming conventions used throughout the codebase including C#, JS and CSS
+
+##[JavaScript coding standards](js-guidelines.md)
+The coding standards and guidelines for JavaScript to be used in the Umbraco codebase
+
+##[JQuery coding standards](jquery-guidelines.md)
+The coding standards and guidelines for using JQuery to be used in the Umbraco codebase
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/jquery-guidelines.md b/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/jquery-guidelines.md
new file mode 100644
index 00000000..03983b92
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/jquery-guidelines.md
@@ -0,0 +1,94 @@
+#JQuery coding guidelines
+
+_Ensure that you have read the [JavaScript Guidelines](js-guidelines.md) document before continuing. As documented in [JavaScript Guidelines](js-guidelines.md) method names are named in "camelCase" and therefore jQuery plugins (since they are methods) are named as "camelCase"._
+
+Just like with other JavaScript in the Umbraco back-office, you need to wrap your class in the jQuery self executing function if you want to use the dollar ($) operator.
+
+##Simple jQuery plugins
+Simple jQuery plugins don't require an internal class to perform the functionality and therefor do not expose or return an API. These could be as simple as vertically aligning something:
+
+ (function($) {
+ $.fn.verticalAlign = function(opts) {
+ //were not using opts (options) for this plugin
+ //but you could!
+ return this.each(function() {
+ var top = (($(this).parent().height() - $(this).height()) / 2);
+ $(this).css('margin-top', top);
+ });
+ };
+ })(jQuery);
+
+##Standard jQuery plugins
+Most jQuery plugins will expose an API or a way in which a developer can interact with the plugin, not just instantiating it. To do this we need to create a class that does the work of the plugin and then expose that class via a different jQuery plugin.
+
+###Naming Conventions
+There's many different ways to expose an API for a jQuery plugin, in Umbraco the standard will be:
+
+* `$("#myId").myFirstJQueryPlugin();` = to instantiate the plugin
+* `var pluginApi = $("#myId").myFirstJQueryPluginApi();` = to retrieve the plugin API for that selector
+
+So essentially, we'll be creating 2 plugins, one to instantiate it and one to retrieve the API. The naming conventions are obvious, create your plugin name and then append the term *Api* to it to create your API plugin name.
+
+###Creating the plugins
+
+//using the same vertical align concept but we'll expose an API for it
+//( not that this is very useful :) )
+
+Umbraco.Sys.registerNamespace("MyProject.MyNamespace");
+
+ (function($) {
+
+ //create the standard jQuery plugin
+
+ $.fn.verticalAlign = function(opts) {
+ //were not using opts (options) for this plugin
+ //but you could!
+ return this.each(function() {
+ //create the aligner for the current element
+ var aligner = new MyProject.MyNamespace.VerticalAligner($(this));
+ });
+ };
+
+ //create the Api retriever plugin
+
+ $.fn.verticalAlignApi = function () {
+ //ensure there's only 1
+ if ($(this).length != 1) {
+ throw "Requesting the API can only match one element";
+ }
+ //ensure this has a vertical aligner applied to it
+ if ($(this).data("api") == null) {
+ throw "The matching element had not been bound to a VerticalAligner ";
+ }
+ return $(this).data("api");
+ }
+
+ //Create a js class to support the plugin
+
+ MyProject.MyNamespace.verticalAligner = function(elem) {
+ //the jQuery selector
+ var _e = elem;
+ var api = {
+ align: function() {
+ var top = ((_e.parent().height() - _e.height()) / 2);
+ _e.css('margin-top', top);
+ }
+ }
+ //store the api object in the jquery data object for
+ //the current selector
+ _e.data("api", api);
+ //return the api object
+ return api;
+ }
+
+ })(jQuery);
+
+###Consuming the plugins
+
+To use the plugin and api is very easy:
+
+NOTE: this is an example plugin, i realize this is not really that useful as a non-simple plugin!
+
+ $("#myId").verticalAlign();
+ //now to get the api and do the alignment
+ $("#myId").verticalAlignApi().align();
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/js-guidelines.md b/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/js-guidelines.md
new file mode 100644
index 00000000..72a75eb3
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/js-guidelines.md
@@ -0,0 +1,158 @@
+#JavaScript coding standards and guidelines
+
+_All JavaScript in the Umbraco core should adhere to these guidelines. The legacy JS code in the core doesn't adhere to these guidelines but should be refactored so that it does._
+
+**All JavaScript in the back-office needs to be in a namespace and defined in a class.**
+
+##Namespaces
+To declare a namespace for your JavaScript class you simply use the following command (as an example to create a namespace called 'Umbraco.Controls'):
+
+ Umbraco.Sys.registerNamespace("Umbraco.Controls");
+
+The above code will require a reference to the NamespaceManager.js file which should generally be included by default in all pages in Umbraco.
+
+##jQuery
+If you are going to use jQuery and it's dollar ($) operator, you will need to wrap your code in a self executing function, this is to ensure that your code will still work with jQuery.noConflict() turned on. Example:
+
+ (function($) {
+ //your code goes here
+ alert($);
+ })(jQuery);
+
+To create jQuery plugins, see the [jQuery Plugin Guidelines](jquery-guidelines.md)
+
+##Creating classes
+
+There are actually quite a few different ways to create classes in JavaScript. For Umbraco we have opted to use the 3rd party, classical inheritance library, [Base2](http://base2.googlecode.com/svn/version/1.0.2/doc/base2.html#/doc/!base2) to make class declarations simple and extendable:
+
+ Umbraco.Sys.registerNamespace("MyProject.MyNamespace");
+
+ MyProject.MyNamespace.NamePrinter = base2.Base.extend({
+
+ //in order to make private methods/variables accessible
+ //to derived types, everything actually has to be public
+ //so to identify private variables, just prefix with an underscore
+
+ //private methods/variables
+
+ _isDebug: true,
+ _timer: 100,
+ _currIndex: 0,
+
+ _log: function (p) {
+ //this is a private method that can only be
+ //accessed inside of this class
+ if (this._isDebug) {
+ console.dir(p);
+ }
+ }
+
+ //public methods/variables
+
+ name: ctorParams,
+ start: function() {
+ this._log("start method called");
+
+ //need to create a closure so we have a reference to our
+ //current this object in the interval function
+ var _this = this;
+
+ //this will write the name out to the console one letter
+ //at a time every _timer interval
+ setInterval(function() {
+ if (_this._currIndex < _this.name.length) {
+ console.info(_this.name[_this._currIndex]);
+ _this._currIndex++;
+ }
+ }, _this._timer);
+ }
+
+ })
+
+Using the class above is easy:
+
+ var printer = new NamePrinter("Shannon");
+ printer.start();
+
+ //or since we exposed the name property publicly,
+ //we can set it after the constructor
+ var printer2 = new NamePrinter();
+ printer2.name = "Shannon";
+ printer2.start();
+
+##Singleton classes
+
+Sometimes it's useful to have a class that can only be instantiated once and shared, rather than have multiple unsynchronised instances floating around. In those circumstances a Singleton pattern should be used.
+
+Define a singleton class:
+
+ Umbraco.Sys.registerNamespace("MyProject.MyNamespace");
+
+ MyProject.MyNamespace.NamePrinterManager = base2.Base.extend({
+
+ //in order to make private methods/variables accessible
+ //to derived types, everything actually has to be public
+ //so to identify private variables, just prefix with an underscore
+
+ //private methods/variables
+
+ _registeredPrinters: [],
+
+ //public methods/variables
+
+ registerPrinter: function(printer) {
+ this._registeredPrinters[printer.name] = printer;
+ },
+ getPrinter: function(name) {
+ return this._registeredPrinters[printer.name];
+ }
+
+ }, { //Static members
+
+ //private methods/variables
+ _instance: null,
+
+ // Singleton accessor
+ getInstance: function () {
+ if(this._instance == null)
+ this._instance = new MyProject.MyNamespace.NamePrinterManager();
+ return this._instance;
+ }
+
+ });
+
+Defining a singleton is the same as defining a regular class, except that we also define a static "getInstance" accessor for accessing the entity in a controlled mannor. By providing the static accessor we can ensure only one instance of the class is created per request.
+
+Using the singleton is very easy:
+
+ var printer = new NamePrinter("Shannon");
+ MyProject.MyNamespace.NamePrinterManager.getInstance().registerPrinter(printer);
+
+##Static classes
+
+Sometimes its useful to have static classes that require no constructor. Before you make one of these, definitely make sure that you wont require different instances of one.
+
+Static classes are very easy:
+
+ Umbraco.Sys.registerNamespace("MyProject.MyNamespace");
+
+ MyProject.MyNamespace.Utility = base2.Base.extend(null, {
+
+ showMsg: function(msg) {
+ alert(msg);
+ }
+ })
+
+Using the class/method requires no instantiation but you can therefore have no separate instances of Utility:
+
+ MyProject.MyNamespace.Utility.showMsg("hello");
+
+##The different between a Singleton class and Static class
+
+Both singleton and static classes allow you access methods directly without having to create an entity of your own. The main difference between the two, and what should govern when to use one over the other, is one of state.
+
+A singleton class can hold information which can be manipulated and retrieved via it's public methods and will be stored between method calls, where as static methods should only manipulate and return values which it can gather from it's parameters and should not be persisted between individual method calls.
+
+A good example of a Singleton is the one highlighted above, "NamePrinterManager". Here printers can be registered using the registerPrinter method for storage, and later retrieved using the getPrinter method. Here, a singleton is used as you will only want one central repository of printers.
+
+A good example use of a Static class is for helper methods, where each method will perform a single self contained task based upon the parameters passed in and will return a immediate response.
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/naming-conventions.md b/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/naming-conventions.md
new file mode 100644
index 00000000..a0249259
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/Coding-Standards/naming-conventions.md
@@ -0,0 +1,19 @@
+#Naming conventions
+
+##HTML & CSS
+* CSS class names will be **.lowercase-hyphenated-names**
+* HTML IDs will be **camelCasedNames**
+
+##JavaScript
+* Namespaces: **ProperCase**
+* Class names: **ProperCase**
+* Method names: **camelCase**
+* Property names: **camelCase**
+* Private property names: **_camelCase**
+
+##C#
+When developing new Class Libraries we will be adhereing as closely as possible to the official guidelines as proposed by Microsoft [http://msdn.microsoft.com/en-us/library/ms229042.aspx](http://msdn.microsoft.com/en-us/library/ms229042.aspx)
+
+Another good reference is "Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries" book by Krzysztof Cwalina and Brad Abrams
+
+Resharper settings are included with the solution, so developers can cleanup code in a consistent manner.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/index.md b/OurUmbraco.Site/Documentation/Development-Guidelines/index.md
new file mode 100644
index 00000000..a4e023e1
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/index.md
@@ -0,0 +1,15 @@
+#Development Guidelines
+
+_All about working with the Umbraco codebase_
+
+##[Coding and naming conventions](Coding-Standards/index.md)
+The naming conventions used throughout the codebase including C#, JS and CSS and how classes in C# and JavaScript should be created and used.
+
+##[The solution and project structure](project-structure.md)
+How the Visual Studio solution is put together, what the funtionality of each project is what the end goal of the structure is.
+
+##[Working with the code](working-with-code.md)
+Describes the process of creating new classes and where they should be stored in regards to namespaces and projects. Also describes how to deal with updating legacy code and how it should be updated.
+
+##[Unit testing](unit-testing.md)
+Describes how to write unit testable code and how to write unit tests for the code in Umbraco.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/project-structure.md b/OurUmbraco.Site/Documentation/Development-Guidelines/project-structure.md
new file mode 100644
index 00000000..64b84d8a
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/project-structure.md
@@ -0,0 +1,52 @@
+#Solution and project structure
+
+_How the Visual Studio solution is structured and what the funcionality of each project is. This also describes the end goal of how we'd like the solution structured._
+
+##The goal
+The goal of the Umbraco project is to be able to be left with only a few Visual Studio projects:
+
+* Umbraco.Core
+* Umbraco.Web
+* Umbraco.Web.UI
+* Umbraco.Tests
+
+Acheiving this goal will take quite a lot of time by slowly migrating over old code and refactoring it into new code under new namespaces and projects. This cannot all happen at the same time but starting down this path now means that we can realize this goal sooner.
+
+##The structure
+
+* Umbraco.Core
+ * Contains all functionality in Umbraco that does not pertain to the Web. For example, it contains any classes and objects that could be used in a console application.
+ * Assembly: **Umbraco.Core.dll**
+ * Does not reference ANY other project except for *umbraco.interfaces*
+* Umbraco.Web
+ * Contains all functionality in Umbraco pertaining to the web.
+ * Contains all of the legacy code (including code behinds) that exists in the umbraco.dll file under the old namespaces but this code will slowly be migrated over to the new namespaces
+ * Assembly: **umbraco.dll**
+ * Unfortunately due to the legacy code this project cannot produce a consistent DLL called Umbraco.Web.dll so we are stuck with umbraco.dll until maybe one day when 'the goal' is acheived we might be able to make a switch but this is low priority.
+* Umbraco.Web.UI
+ * Contains ONLY rendering files, webforms files and MVC Views: *JS, CSS, ASPX, ASCX, ASMX, CSHTML*
+ * Legacy webforms files have their codebehind files in the Umbraco.Web project. If these legacy webforms files need to be worked on, we can migrate their codebehind files to the Umbraco.Web.UI project as we see fit.
+ * **ALL NEW ASPX, ASCX, ASMX and any other webforms file that requires a codebehind will exist under the Umbraco.Web.UI project**
+ * **MORE IMPORTANT -> BECAUSE THE NAMES OF THE FOLDERS ARE NOT PROPER CASE YOU WILL NEED TO ENSURE THAT THE NAMESPACE IS OF THE CORRECT CASE. SO WHEN YOU CREATE YOUR ASPX PAGE, THE NAMESPACE NAME MIGHT BE: *Umbraco.Web.UI.umbraco.settings* . YOU NEED TO CHANGE THIS TO: *Umbraco.Web.UI.Umbraco.Settings***
+* Umbraco.Tests
+ * Contains all unit tests for Umbraco
+ * Uses Nunit for unit tests
+
+##Legacy projects
+
+_The code in the legacy projects will eventually be migrated and refactored with correct naming and code conventions into the new projects and namespaces_
+
+**TODO: Documentation to be completed**
+
+* SqlCE4Umbraco
+* umbraco.businesslogic
+* umbraco.cms
+* umbraco.controls
+* umbraco.datalayer
+* umbraco.editorControls
+* umbraco.interfaces
+* umbraco.MacroEngines
+* umbraco.MacroEngines.Iron
+* umbraco.macroRenderings
+* umbraco.providers
+* umbraco.webservices
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/unit-testing.md b/OurUmbraco.Site/Documentation/Development-Guidelines/unit-testing.md
new file mode 100644
index 00000000..d34f5aa1
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/unit-testing.md
@@ -0,0 +1,12 @@
+#Unit testing
+
+_Describes how to write unit testable code and how to write the unit tests for your code in Umbraco_
+
+##Writing unit testable code
+**TODO: Documentation to be completed**
+
+##Writing unit tests
+**TODO: Documentation to be completed**
+
+###Unit test helper classes
+**TODO: Documentation to be completed**
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Development-Guidelines/working-with-code.md b/OurUmbraco.Site/Documentation/Development-Guidelines/working-with-code.md
new file mode 100644
index 00000000..c0c3f8b3
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Development-Guidelines/working-with-code.md
@@ -0,0 +1,24 @@
+#Working with the code
+
+_Guidelines for creating and updating code in the Umbraco core_
+
+##Guidelines
+
+* All new code goes in either *Umbraco.Core* or *Umbraco.Web*
+ * Depending on what type of code you are writing. If it has to do with the web, then of course it goes in Umbraco.Web. If you could use it in a console app or something like that, then it goes in Umbraco.Core
+* *Umbraco.Web.UI* is **only** for rendering files: *JS, CSS, ASPX, ASCX, CSHTML*
+ * Any new *ASPX, ASCX* will also put their code behind files here too
+ * All old code behind files exist in *Umbraco.Web*, these can be migrated over to *Umbraco.Web.UI* if and when you work on them
+* If you are updating existing code, you should consider moving it to the correct project and namespace, refactoring it to have consistent and correct naming conventions and code reviewing the legacy code to bring it up to date (i.e. removing what isn't needed and fixing what you see)
+ * This is however not a requirement as in some cases this may take more time than you wish to commit to which is ok. Eventually this code will be moved and refactored, we don't have to do it all at once
+* If you are updating existing code you should still put any new classes that are created for the legacy code into the new projects/namespaces
+* New code should be written as unit testable code, you should always use constructor dependencies where possible instead of relying on global singletons to access services. Of course this is not always possible when you don't have control over instantiating objects but when it is you should always use constructor dependencies. This forces you to write clean and unit testable code.
+* New and updated code should have unit tests written for them in the Umbraco.Tests project which uses Nunit, by writing unit tests for your code you realize how to improve the APIs you are writing and of course create something that we can test.
+* When obsoleting old code be sure to remove references throughout the codebase to this obsolete code and update the codebase to use the new classes and methods
+* All new classes should be marked 'internal' until we decide we want to publicly expose the APIs.
+
+##Potential issues
+
+* You may come across some issues when developing new classes in *Umbraco.Core* because you may need objects that exist in other projects
+ * This is because *Umbraco.Core* doesn't reference any other projects (except for umbraco.interfaces) and it **never** should
+ * To get around these problems you will need to migrate the code you want to reference in to the *Umbraco.Core* project and obsolete the old code, sometimes this is very easy to do, othertimes it could mean a bit of work and in those cases it will be up to you to decide if you will just put the new code where the legacy code is if time does not permit. However, the new code still needs to be marked internal so we can easily move later on
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Extending-Umbraco/Dashboards/index.md b/OurUmbraco.Site/Documentation/Extending-Umbraco/Dashboards/index.md
new file mode 100644
index 00000000..da19ca54
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Extending-Umbraco/Dashboards/index.md
@@ -0,0 +1,15 @@
+#This section is waiting for content
+
+This documention has not been written yet, but it is on the roadmap.
+
+###Progress
+Consult the Umbraco 4 documentation trello board to see what we are currently working on.
+[See the TrelloBoard here](https://trello.com/board/umbraco-4-documentation/4fdb02df8fc3ef067e809e95)
+
+###Contribution
+Umbraco is a community powered project and we welcome any contribution, big or small, even fixing a typo is a valuable contribution.
+[See how to contribute](https://github.com/umbraco/Umbraco4Docs)
+
+
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Extending-Umbraco/Macro-Parameter-Editors/index.md b/OurUmbraco.Site/Documentation/Extending-Umbraco/Macro-Parameter-Editors/index.md
new file mode 100644
index 00000000..bf5aa663
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Extending-Umbraco/Macro-Parameter-Editors/index.md
@@ -0,0 +1,17 @@
+#Macro Parameter Editors
+
+This documention has not been written yet, but it is on the roadmap.
+
+In the meantime, you can find details of how to create a Macro Parameter Editor [here](http://www.richardsoeteman.net/2010/01/04/CreateACustomMacroParameterType.aspx)
+
+###Progress
+Consult the Umbraco 4 documentation trello board to see what we are currently working on.
+[See the TrelloBoard here](https://trello.com/board/umbraco-4-documentation/4fdb02df8fc3ef067e809e95)
+
+###Contribution
+Umbraco is a community powered project and we welcome any contribution, big or small, even fixing a typo is a valuable contribution.
+[See how to contribute](https://github.com/umbraco/Umbraco4Docs)
+
+
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Extending-Umbraco/Packaging/index.md b/OurUmbraco.Site/Documentation/Extending-Umbraco/Packaging/index.md
new file mode 100644
index 00000000..da19ca54
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Extending-Umbraco/Packaging/index.md
@@ -0,0 +1,15 @@
+#This section is waiting for content
+
+This documention has not been written yet, but it is on the roadmap.
+
+###Progress
+Consult the Umbraco 4 documentation trello board to see what we are currently working on.
+[See the TrelloBoard here](https://trello.com/board/umbraco-4-documentation/4fdb02df8fc3ef067e809e95)
+
+###Contribution
+Umbraco is a community powered project and we welcome any contribution, big or small, even fixing a typo is a valuable contribution.
+[See how to contribute](https://github.com/umbraco/Umbraco4Docs)
+
+
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Extending-Umbraco/Property-Editors/index.md b/OurUmbraco.Site/Documentation/Extending-Umbraco/Property-Editors/index.md
new file mode 100644
index 00000000..db503819
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Extending-Umbraco/Property-Editors/index.md
@@ -0,0 +1,17 @@
+##Creating Property Editors
+
+There are two types of property editors in Umbraco
+
+###Abstract Data Editor
+
+Content to come from
+http://www.nibble.be/?p=91
+
+###User Control Wrapper
+
+Content to come from
+http://www.nibble.be/?p=93
+
+
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Extending-Umbraco/Trees/index.md b/OurUmbraco.Site/Documentation/Extending-Umbraco/Trees/index.md
new file mode 100644
index 00000000..da19ca54
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Extending-Umbraco/Trees/index.md
@@ -0,0 +1,15 @@
+#This section is waiting for content
+
+This documention has not been written yet, but it is on the roadmap.
+
+###Progress
+Consult the Umbraco 4 documentation trello board to see what we are currently working on.
+[See the TrelloBoard here](https://trello.com/board/umbraco-4-documentation/4fdb02df8fc3ef067e809e95)
+
+###Contribution
+Umbraco is a community powered project and we welcome any contribution, big or small, even fixing a typo is a valuable contribution.
+[See how to contribute](https://github.com/umbraco/Umbraco4Docs)
+
+
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Extending-Umbraco/index.md b/OurUmbraco.Site/Documentation/Extending-Umbraco/index.md
new file mode 100644
index 00000000..d16955de
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Extending-Umbraco/index.md
@@ -0,0 +1,21 @@
+#Extending Umbraco
+
+###[Dashboards](Dashboards/index.md)
+
+A Dashboard is a component for displaying elements on the right-hand side of the backoffice UI area. **(coming soon)**
+
+###[Macro Parameter Editors](Macro-Parameter-Editors/index.md)
+
+A parameter editor defines the usage of a property editor for use as a parameter for Macros. **(coming soon)**
+
+###[Packaging](Packaging/index.md)
+Information on the packaging manifest format and how assets should be packaged as a zip file for easy distribution
+**(coming soon)**
+
+###[Property Editors](Property-Editors/index.md)
+
+A property editor is a way to insert content into Umbraco. An example of a property editor is the Rich Text Editor. It may be confused with Data Types. Its possible to have many Rich Text Editor Data Types with different settings that all use the Rich Text Editor property editor. **(coming soon)**
+
+###[Trees and Applications](Trees/index.md)
+
+**(coming soon)**
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204006.png b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204006.png
new file mode 100644
index 00000000..1d3c945c
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204006.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204144.png b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204144.png
new file mode 100644
index 00000000..c7c60094
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204144.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204429.png b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204429.png
new file mode 100644
index 00000000..52dbb612
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204429.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204433.png b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204433.png
new file mode 100644
index 00000000..efe194d3
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_204433.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_223022.png b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_223022.png
new file mode 100644
index 00000000..b7dceace
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-12_223022.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-17_164508.png b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-17_164508.png
new file mode 100644
index 00000000..a1e8f985
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-17_164508.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-17_173822.png b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-17_173822.png
new file mode 100644
index 00000000..78b3a4db
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/Manual/2012-03-17_173822.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-db-CE.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-db-CE.png
new file mode 100644
index 00000000..b0554e52
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-db-CE.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-db-install.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-db-install.png
new file mode 100644
index 00000000..f19b1d36
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-db-install.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-finish.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-finish.png
new file mode 100644
index 00000000..e2d51d18
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-finish.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-start.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-start.png
new file mode 100644
index 00000000..4d729566
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-start.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-starter-kit.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-starter-kit.png
new file mode 100644
index 00000000..a3cea2b6
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-starter-kit.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-user.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-user.png
new file mode 100644
index 00000000..a92f5250
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/web-user.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-license.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-license.png
new file mode 100644
index 00000000..49dffdfb
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-license.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-search.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-search.png
new file mode 100644
index 00000000..97d50abf
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-search.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-start.png b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-start.png
new file mode 100644
index 00000000..5e2c7359
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebMatrix/webmatrix-start.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/add-from-gallery.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/add-from-gallery.png
new file mode 100644
index 00000000..eeadc0a3
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/add-from-gallery.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/complete.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/complete.png
new file mode 100644
index 00000000..71b4bb4b
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/complete.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-step1.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-step1.png
new file mode 100644
index 00000000..1c01b422
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-step1.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-step2.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-step2.png
new file mode 100644
index 00000000..19fe74b9
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-step2.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-type.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-type.png
new file mode 100644
index 00000000..44f2d5ea
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/db-type.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/download-files.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/download-files.png
new file mode 100644
index 00000000..680395ed
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/download-files.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/search-umbraco.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/search-umbraco.png
new file mode 100644
index 00000000..e24d4ab5
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/search-umbraco.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/warning.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/warning.png
new file mode 100644
index 00000000..72f22d11
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/warning.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-db.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-db.png
new file mode 100644
index 00000000..be216c66
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-db.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-done.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-done.png
new file mode 100644
index 00000000..5df0672b
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-done.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-install.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-install.png
new file mode 100644
index 00000000..170c569f
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-install.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-start.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-start.png
new file mode 100644
index 00000000..3326f300
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-start.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-starter.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-starter.png
new file mode 100644
index 00000000..a32e55d9
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-starter.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-user.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-user.png
new file mode 100644
index 00000000..16e19cf1
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/web-user.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/images/WebPl/website.png b/OurUmbraco.Site/Documentation/Installation/images/WebPl/website.png
new file mode 100644
index 00000000..b578ff60
Binary files /dev/null and b/OurUmbraco.Site/Documentation/Installation/images/WebPl/website.png differ
diff --git a/OurUmbraco.Site/Documentation/Installation/index.md b/OurUmbraco.Site/Documentation/Installation/index.md
new file mode 100644
index 00000000..7e51be46
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Installation/index.md
@@ -0,0 +1,13 @@
+#Installation
+
+_Covers the different ways to install Umbraco. We recommend you either use Microsoft Platform installer or Microsoft Webmatrix as an easy way to get started with Umbraco._
+
+##[Manual installation](install-umbraco-manually.md)
+Goes through the steps needed to either download a stable release or a nightly version, unzipping, and getting it running on a local webserver.
+
+##[Webmatrix installation](install-umbraco-with-microsoft-webmatrix.md)
+Microsoft Webmatrix is a simple to use editor with an embedded webserver, to get you easy and fast up and running with Umbraco.
+
+
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Installation/install-umbraco-manually.md b/OurUmbraco.Site/Documentation/Installation/install-umbraco-manually.md
new file mode 100644
index 00000000..602345e5
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Installation/install-umbraco-manually.md
@@ -0,0 +1,108 @@
+#Install Umbraco manually
+
+_Follow these steps to do a full manual install of Umbraco._
+
+##Download Umbraco binaries
+The stable releases of the Umbraco binaries are available from [Codeplex](http://umbraco.codeplex.com/releases). If you don't mind working with experimental builds, you could download a [nightly release](http://nightly.umbraco.org/) at your own perril (no guarantees that it will work).
+
+##Unzip files
+Once you have the binary release of your liking saved to disk, make sure that the file has not been blocked by windows. Right-click the file you downloaded and choose "Properties". If it says at the bottom of the properties window: "This file came from another computer and might be blocked to help protect this computer" then make sure to click the "Unblock" button so that all of the binary files will be unzipped later on.
+
+Now you can unzip the file to a location of your choosing (for example: `D:\Dev\MyUmbracoSite\`)
+
+##Choose your webserver
+There are two ways to run the binaries in a webserver:
+
+1. The easy way: using IIS Express
+2. Internet Information Server (IIS)
+
+###Using IIS Express
+
+You can download IIS Express from the [Web Platform Installer (WebPI)](http://www.microsoft.com/web/downloads/platform.aspx) (search for "IIS Express"). To be able to develop against IIS Express from Visual Studio 2010, you need to have VS2010 Service Pack 1 installed, which can also be acquired from the WebPI.
+
+
+
+While you will be able to launch IIS Express from the command line and use it to serve your site this way, it is much easier to use Web Matrix (also available through the WebPI) which spins up an IIS Express instance when needed. In fact, choosing Web Matrix in the WebPI will automatically also download and install IIS Express as a dependency.
+
+Once Web Matrix is installed, you can simply right-click the folder in which you unzipped Umbraco, choose "Open as a Web Site with Microsoft Web Matrix" from the context menu (should be near the top). Once Web Matrix starts, just click the "Run" button to launch your site. Web Matrix has an additional benefit: it allows you to edit the files in your site out of the box.
+
+
+
+###Using IIS
+If you want to use IIS to host your Umbraco site, you have two options:
+
+1. **Using a hostname that is pointing to your local machine.**
+
+ *Note: We strongly recommend using IIS7(.5), while IIS6 may work, this guide will cover IIS7 only. IIS7 is available in Windows 7 and Windows Server 2008.*
+
+ Create a new website in IIS by right-clicking *Sites* and choosing "Add site...". The site name can be anything you want.
+
+ You will then be asked what kind of application this is, make sure to pick (or create) an application pool that uses ASP.NET 4.0 as it's basis (the default ASP.NET 4.0 is configured perfectly for this, we recommend you pick that one). Use the "Select.." button to pick a different application pool, you shouldn't have to change the other settings.
+
+ Finally fill in the hostname, in this example we'll use *MyUmbracoSite.local*
+
+ 
+
+ As a final step, you will need to add the *MyUmbracoSite.local* hostname to your hosts file. If you haven't altered your host file before you will need to make sure that your current user has write permissions to the hosts file. The hosts file typically lives in C:\Windows\System32\drivers\etc\hosts (the file has no extension).
+
+ To enable you to write to the file, right-click it and click "Properties". Go to the "Security" tab and find the current logged in user, click the user and then the "Edit..." button. Check the *Allow Modify* permission there.
+
+ *Note: **this is not without risk**. If your user account can edit the hosts file, malware can do the same under your account and attempt to change the hosts file to redirect well known sites to malicious websites. Always make sure to revert the security settings if you want to be safe!*
+
+ Add a line to the hosts file that points the new hostname to the local machine:
+
+ `127.0.0.1 MyUmbracoSite.local`
+
+ You can now go to http://MyUmbracoSite.local and the install wizard should appear.
+
+2. **Using a virtual directory**
+
+ *Note: We strongly recommend using IIS7(.5), while IIS6 may work, this guide will cover IIS7 only. IIS7 is available in Windows 7 and Windows Server 2008.*
+
+ To do so, start IIS Manager and right click on the **Default Website** and choose **Add virtual directory**.
+
+ 
+
+ Fill in the virtual directory name and the path where you unzipped Umbraco's files (so the path where default.aspx and web.config are located).
+
+ 
+
+ Now you have a new virtual directory, but IIS doesn't yet know it's an application that you're pointing to, so you need to tell it that. Right-click the vdir you just created, in this case called *MyUmbracoSite* and choose **Convert to application**.
+
+ 
+
+ You will then be asked what kind of application this is, make sure to pick (or create) an application pool that uses ASP.NET 4.0 as it's basis (the default ASP.NET 4.0 is configured perfectly for this, we recommend you pick that one). Use the "Select.." button to pick a different application pool, you shouldn't have to change the other settings.
+
+ 
+
+ *Note: if ASP.NET 4.0 is not a choice in your list of application pools, don't attempt to create it manually, you will need to [register it in IIS](http://stackoverflow.com/questions/4890245/how-to-add-asp-net-4-0-as-application-pool-on-iis-7-windows-7#answer-4890368), be sure to use Brad Christie's answer here, you **have** to register it, not just create a new application pool manually, that will not work.*
+
+ You can now go to http://localhost/MyUmbracoSite and the install wizzard should appear.
+
+*Please note: You will not be able to run Umbraco from Visual Studio's built-in webserver Casini. You do, however, have the option to configure VS to use IIS Express or IIS if needed.*
+
+In order for Umbraco to have enough permissions to write files to disk, you should give the IIS_IUSRS user modify permissions in the folder in which you've unzipped your Umbraco files.
+
+While giving broad permissions is usually fine for development environments, you may want to restrict permissions further on a public facing server. In that case, at least the App\_Data folder needs modify permissons for either the IIS_IUSRS group or the specific user that is linked to the application pool that you're using (assumes that you will not do live editing or installing on the server).
+
+###Choose database environment
+There are two options to choose from with regards to a database environment:
+
+1. SQL CE
+2. SQL Server 2008 (Express and higher)
+
+###SQL CE
+
+SQL CE is a good option if you want to get started quickly, you don't need to create a database in a server ahead of time and it's free. That said, it doesn't scale very well for sites with a large amount of content. Once you reach the point where SQL CE doesn't seem to cut it for your site, you can migrate it to a SQL Server database.
+
+To start using SQL CE, just choose it in the install wizzard: "*I want to use SQL CE 4, a free, quick-and-simple embedded database*".
+
+###SQL Server 2008
+To be able to use SQL Server, you should setup an empty database before you can continue installing Umbraco. It's completely up to you how you want to configure this database, but make sure it's connectable over TCP/IP and that it has a SQL username and SQL password (you can use windows authentication, but that would require you to write your own connection string).
+
+Generally, for development environments you would see the database user have database owner rights, but make sure to comply with the rules you or your workspace has setup for this.
+
+Once you've created the database and credentials, enter those details in the install wizard after choosing the *I already have a blank SQL Server 2008 database* option.
+
+##Finishing off
+Follow the installation wizard and after a few easy steps and choices you should get a message saying the installation was a success.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Installation/install-umbraco-with-microsoft-webmatrix.md b/OurUmbraco.Site/Documentation/Installation/install-umbraco-with-microsoft-webmatrix.md
new file mode 100644
index 00000000..a906ebe0
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Installation/install-umbraco-with-microsoft-webmatrix.md
@@ -0,0 +1,61 @@
+#Install Umbraco with Microsoft Webmatrix
+
+Follow these simple steps to be up and running with WebMatrix quickly and easily. The benefit of using WebMatrix is that it is super simple to get up and running.
+
+##Download and launch webmatrix
+
+1. Go to [http://www.microsoft.com/web/webmatrix/](http://www.microsoft.com/web/webmatrix/) and download WebMatrix for Free
+1. Once installed launch WebMatrix and from the four options shown - choose the option labelled **Site From Web Gallery**
+
+ 
+
+1. In the search box in the top right hand corner, type **Umbraco**
+1. From the results select the item marked **Umbraco CMS**
+
+ 
+
+1. In the **Site Name** box give your site an appropriate name and click **Next**
+1. Accept the license in the next step by clicking **I Accept**
+
+ *The list of items may be more than just Umbraco as shown in the screenshot. This is because WebMatrix uses the Web Platform installer behind the scenes to install Umbraco and will also download any other software that is required in order for the website to run.*
+
+1. WebMatrix will download the required files to run Umbraco, once done you will be prompted with a confirmation message.
+
+1. Once completed you need to launch the website from WebMatrix.
+ 1. Click the Sites section in the lower left hand corner
+ 1. Then click on the URL such as `http://localhost:22830` *Port number may be different as it is random*
+ 1. The Web installer for Umbraco will now launch inside your default browser
+
+## Umbraco Web Installer
+This section continues from where we left off but covers the installation and configuration of Umbraco inside your web browser, when you run Umbraco for the first time.
+
+1. You will see the welcome screen. After reading through the page click **Lets get started!**
+
+ 
+1. On the next screen you are presented with four options for configuring the database to be used by Umbraco. Choose the option marked **I want to use SQL CE 4** and click **Install**. This is the quickest and easiest option to get started with Umbraco, especially for small sites, and uses a file stored on disk as the database.
+
+ *If you need to migrate your database from SQL CE to SQL Server you can do it at a later point.*
+
+ 
+1. You will be shown the progress bar during the database installation, once done click **Next**
+
+ 
+
+1. On the next screen you need to fill in the form to create a user so you can access the back office of Umbraco. Once completed click **Create user**
+
+ 
+
+1. From this next step you can decide if you want to install a starter kit. A starter kit installs an example site for you which allows you to pull it apart and learn how Umbraco works.
+
+1. After deciding whether to skip or install a starter kit you are now finished!
+
+1. Now click the **Set up your new website** to be logged into the Umbraco back-office.
+
+ 
+
+1. Celebrate - you're all done!
+
+### Congratulations, you have installed an Umbraco site!
+
+### Note
+*You can log into your Umbraco site by entering the following into your browser - http://yoursite.com/umbraco/*
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Api/Base/ConfigFile.md b/OurUmbraco.Site/Documentation/Reference/Api/Base/ConfigFile.md
new file mode 100644
index 00000000..0fe80cd4
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Api/Base/ConfigFile.md
@@ -0,0 +1,42 @@
+# The RestExtentions.config file
+
+As mentioned the configuration file contains the data necessary for the /Base system when exposing the methods in your class library.
+You can also use the RestExtension method in your code if you don't want to use the XML config files.
+
+The config file follows the following structure:
+
+
+
+
+ .
+ .
+
+
+ .
+ .
+
+
+
+It contains one ext tag for each class you want the /Base system to expose, and the ext tags contains one permission tag for each method you want the /Base system to expose
+The ext tag
+
+The ext tag contains the following attributes:
+
+assembly: The name of your assembly - usually the filename of the class library output without the .dll extension.
+type: The fully qualified name of the class containing the methods you want to expose via /Base
+alias: The name that /Base will use when mapping url's to your class. If you put "MyAlias" here, the url wil start with: yourdomainname/Base/MyAlias.
+
+## The permission tag
+
+The permission tag contains the following attributes:
+
+* method: The name of the method in your class, this has to correspond exactly with the name in the code. It is not possible to make alias's for the methods.
+* allowAll: If this attribute is set to "true", there will be no restrictions on who will be able to call this method.
+* allowGroup: This attribute can contain a comma separated string of user group names that will be allowed to call this method.
+* allowType: This attribute can contain a comma separated string of user type names that will be allowed to call this method.
+* allowMember: This attribute can contain the id of a single user allowed to call this method.
+* returnXml: if set to false, umrbaco will not wrap the result of the method in a element
+
+The user calling the method, will be allowed if she has access through at least one of the possible attribute values. If allowAll is set to true, the other attributes has no effect, everyone willl be allowed.
+
+The methods in your class library will only be exposed of there is a permission tag for the method.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Api/Base/Examples/Parameters.md b/OurUmbraco.Site/Documentation/Reference/Api/Base/Examples/Parameters.md
new file mode 100644
index 00000000..83e4a31c
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Api/Base/Examples/Parameters.md
@@ -0,0 +1,18 @@
+# Sending parameters to base methods
+
+Now that you have your simple base method up and running, let look into how to send parameters to your base method.
+
+I modified the Hello Method from previous example to take two strings as parameters
+
+ namespace BaseTest {
+ public class TestClass {
+ public static string Hello( string str1, string str2 ) {
+ return str1 + " " + str2;
+ }
+ }
+ }
+
+Now when you want to call the base method you just make a request to the following url:
+http://yourdomain.com/Base/TestAlias/Hello/Nice/Test.aspx
+
+The "Nice" and "Test" after the method name is the two parameters that is parsed along to the base call and will result in the output: "Nice Test"!
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Api/Base/Examples/XPathNodeIterator-returntype.md b/OurUmbraco.Site/Documentation/Reference/Api/Base/Examples/XPathNodeIterator-returntype.md
new file mode 100644
index 00000000..10e45d87
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Api/Base/Examples/XPathNodeIterator-returntype.md
@@ -0,0 +1,41 @@
+# XPathNodeIterator as return type
+
+ umbracoBase methods also take parameters
+
+It is also possible to pass a parameter on the "Base-enabled" method allowing you to extract different data depending on which number/string etc. that was passed to the method.
+
+In the example below, we have a "Base-enabled" method called getMemberInfo and that method has one parameter 'memberid' of type integer. The method returns an XPathNodeIterator.
+
+What the example does (remember to import System.Xml and umbraco.cms.businesslogic.member), is that it pulls member properties by an id from umbraco and presents it as xml.
+
+ public static System.Xml.XPath.XPathNodeIterator getMemberInfo(int memberid)
+ {
+ Member m = new Member(memberid);
+ XmlDocument xmldoc = new XmlDocument();
+ if (m != null)
+ {
+ XmlElement xeData = xmldoc.CreateElement("data");
+ foreach (umbraco.cms.businesslogic.property.Property property in m.getProperties)
+ {
+ XmlElement xeProperty =
+ xmldoc.CreateElement(m.getProperty(property.PropertyType).PropertyType.Alias.ToLower());
+ xeProperty.InnerText = property.Value.ToString();
+ xeData.AppendChild(xeProperty);
+ }
+ xmldoc.AppendChild(xeData);
+ }
+ return xmldoc.CreateNavigator().Select("//data");
+ }
+
+if you pass a member id (e.g.1081) to the "Base-url" like this:
+http://yourdomain/Base/MemberInfo/getMemberInfo/1081.aspx
+
+You should then be seeing output somewhat similar to this, if your member has some properties attached to it:
+
+
+ sometext
+ sometext
+ sometext
+
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Api/Base/HelloWorld.md b/OurUmbraco.Site/Documentation/Reference/Api/Base/HelloWorld.md
new file mode 100644
index 00000000..0482b1e0
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Api/Base/HelloWorld.md
@@ -0,0 +1,64 @@
+# Simple /base samples
+
+##Hello World
+To explain how base works, we'll do a quick "Hello World" sample. Open Visual Studio (or visual C# express) (VB.net can also be used, but all the samples are written in C#)
+
+Create a new project called BaseTest, this could be a class library or a asp.net web application project. We will only be interested in the DLL that is produced on compile.
+
+Next create a new class called `TestClass`. The namespace should automatically be the same as the project which is `BaseTest`.
+
+Copy the following code into the class.
+
+ namespace BaseTest {
+ [RestExtension("myAlias")]
+ public class TestClass {
+ [RestExtensionMethod()]
+ public static string Hello() {
+ return "Hello World";
+ }
+ }
+ }
+
+Here we have a simple static string method called `Hello` which will return the string "Hello World".
+
+Compile your project and copy the projects .dll to your umbraco /Bin folder - In this sample the DLL is called BaseTest.dll.Now let's get this hooked up to /base.
+
+##Registering with base
+
+####Automatic registration using Attributes
+In the above example, Because we used the Attributes "RestExtension" and "RestExtensionMethod", umbraco is smart enough (since version 4.5) to hook up the methods automatically. After coping the dll file to your umbraco bin folder, try calling the url /Base/myAlias/Hello. You will get the response: "Hello World".
+
+###Registration by configuration
+If you prefer the use of config files instead of the attributes, you can change register your methods through the restExtensions.config file.
+
+Open the /config/restExtensions.config in notepad, we will now register this method in /base.
+
+Edit the restExtensions.config file so it looks like this:
+
+
+
+
+
+
+
+
+If you've followed the above tutorial you can now goto this url: /Base/TestAlias/Hello.aspx
+
+This should give you an xml page with a single node in it: `Hello World`
+
+##So what just happened?
+So what we just did was build a simple string method in .net and afterwards gained direct access to it's return value using a standard Url. Let's take a closer look on what we did to make that happen.
+
+First we setup our "TestClass" in the /Base configuration file "restExtenstions.config" by adding this line:
+
+
+
+This line tells /Base that we're using "Basetest.dll" in the "bin" folder. And in this assembly we're using the class `TestClass` in the `BaseTest` Namespace, and lastly it tells /Base that we'll reference `TestClass` with the alias `TestAlias` So this basicly tells the system that all requests send to urls starting with /Base/TestAlias will be send to the methods within the `TestClass`
+
+So now we have the class setup, now we need to setup permissions for each individual method with that class, so you don't need to expose everything in a class. To do that we added this line to the config
+
+
+
+It holds the methods name and allows everyone to access it. Later we'll look at how to control what umbraco members have access.
+
+That's it. Now you've setup a very simple /base url. Next we'll look at how to return more complex data and how to send data to umbraco using simple urls.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Api/Base/Index.md b/OurUmbraco.Site/Documentation/Reference/Api/Base/Index.md
new file mode 100644
index 00000000..69b26550
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Api/Base/Index.md
@@ -0,0 +1,32 @@
+#Umbraco /Base
+
+/Base is a extendable system for creating raw feeds directly from Umbraco using very basic Url's. This enables developers to access umbraco data through javascript, f.ex or flash. It allows even to modify umbraco data directly via url's.
+Although /Base could be called a very simple REST system, it is not completely true. A rest based API would implement all the HTTP methods.
+
+## Why using umbracoBase?
+The main advantage is that you don't need any masterpages or scripts. This is a perfect and fast way to expose (or change) nodes.
+
+To use /Base you need to know some .Net programming and some Umbraco basics.
+
+## How it works
+/Base doesn't generate any data by itself, it just acts as a proxy and outputs data based on the urls passed to it. It is actually a very basic system for getting data out of umbraco with very few lines of code.
+
+/Base enables exposes .Net methods via URLs. The URL structure is
+ `/Base/Class/MethodName`
+The Class can be aliased and doesn't need to be the same as the class name. If a method is not explicitily exposed then /Base won't make it available via a URL.
+
+If you add parameters, the url will become `/Base/ClassAlias/MethodName/Parameter1/Parameter2`. If you have not enabled directory urls , you need to add an .aspx extention at the end.
+
+## Setting up
+There are 2 ways to make your own .net classes /Base enabled.
+
+ 1. By using the [RestExtentions.config](The-RestExtentions.config-file.md) file
+ 2. Since umbraco 4.6 you can decorate classes and methods with .Net Attributes to make them /Base enabled. See the [hello world](helloworld.md) to find out how.
+
+## Advanced examples
+
+* using [parameters](examples/parameters.md)
+* special [return types](Return-types.md)
+* using [XPathNodeIterator as return type](examples/XPathNodeIterator-returntype.md)
+
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Api/Base/Return-types.md b/OurUmbraco.Site/Documentation/Reference/Api/Base/Return-types.md
new file mode 100644
index 00000000..caceca23
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Api/Base/Return-types.md
@@ -0,0 +1,32 @@
+# Return types for the /Base system
+
+As shown in the simple /base samples, a class library type for use with /base needs to contain some methods that are both public and static. /base will return an error if you attempt to call a method that does not meet these requirements.
+
+If the /base system encounters an error or exception during the execution of your code it will return an error message embedded in an error tag like this:
+
+`Method has to be public and static`
+
+Your methods can have almost any return type. Base will convert your type to a string and return the result of the conversion. The string representation of your return type is produced by calling ToString() on the return type, which in many cases amounts to the name of the type.
+
+The only exception to this rule is your method returns a System.Xml.XPath.XPathNodeIterator, in which case /base will return the OuterXml of the Xml content of the XPathNodeIterator.
+
+If your method returns a XPathNodeIterator /Base will return the xml resulting from a call to XPathNodeIterator.Current.OuterXml, which enables you to return the exact xml content you wish if you put your xml in a XPathNodeIterator before returning it from you method. Since Umbraco 4.6 you can also return an [XmlDocument](http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx) and [XDocument](http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument.aspx).
+
+Your class library will typically have the following structure:
+
+ namespace MyNameSpace {
+ public class MyClass {
+ public static string MyStringMethod() {
+ // Code here that returns a string
+ }
+ public static XPathNodeIterator MyXmlMethod() {
+ // Code that returns a XPathNodeIterator here
+ }
+ }
+ }
+
+If your method returns a string, or any other type that has a ToString() method, /base will return the resulting string in a set of value tags like this:
+
+`String result`
+
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Api/Umbraco.Library/index.md b/OurUmbraco.Site/Documentation/Reference/Api/Umbraco.Library/index.md
new file mode 100644
index 00000000..70a2cf8a
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Api/Umbraco.Library/index.md
@@ -0,0 +1,528 @@
+#Umbraco.Library
+_Umbraco.Library is a Xslt extension library, built specifically for xslt macros in umbraco 4. It contains many utility methods which are strictly for use in Xslt, but also has a number of more general purpous methods, which can used more broadly. All samples are written with Xslt in mind, but can easily be referenced in both c# and razor under the `umbraco.library` namespace_
+
+##NiceUrl
+Use this to return a 'Friendly URL' for a given node in the Umbraco content section. A 'Friendly URL' is the complete encoded URL excluding the domain.
+
+Please note: When using useDomainPrefixes=true in UmbracoSettings.config, NiceUrl returns the url including the domain.
+
+###Simple NiceUrl XSLT Example
+This example will return the friendly url for the Parent page that is currently being viewed.
+
+
+
+###NiceUrl example used in an anchor tag:
+This example shows how to use this to build a link to this page:
+
+
+
+
+
+
+
+
+Or it can be written using the short hand version:
+
+
+
+
+
+Both of the above statements used on this page will produce:
+
+ Umbraco.Library
+
+##FormatDateTime
+Using FormatDateTime allows you to format a date, such as the node's createDate and updateDate XML attributes for example.
+
+ FormatDateTime('String Date', 'String Format')
+
+- String Date** = The date you want to format
+- String Format** = a coded string that is an example of the format you want to use (see below).
+
+###String Format Codes:
+- d = Short date format for current culture (eg. 01/03/10)
+- D = Long date format for current culture (eg. 1 March 2010)
+
+###Month
+- MMMM = Full month name spelled out ('August')
+- MMM = Abbreviated month name ('Aug')
+- MM = 2 digit month ('08')
+- M = 1 or 2 digit month ('8')
+
+Note that if the 'M' format specifier is used alone, without other custom format strings, it is interpreted as the standard month day pattern format specifier. If the 'M' format specifier is passed with other custom format specifiers or the '%' character, it is interpreted as a custom format specifier.
+
+
+###Day
+- dddd = Full day of week ('Thursday')
+- ddd = Abbreviated day of the week ('Thu')
+- dd = 2 digit day ('06')
+- d = 1 or 2 digit day ('6')
+
+###Year
+- y or yy = 2 digit year ('99')
+- yyyy = 4 digit year ('1999')
+
+###Hour
+- h = 1 or 2 digit hour ('9')
+- hh = 2 digit hour ('09')
+- H = 24 hour ('21')
+
+###Minute
+- m = 1 or 2 digit minute ('3')
+- mm = 2 digit minute('03')
+
+More date and time formatting codes and information can be found here:
+
+- [MSDN: Standard Date and Time Format Strings](http://msdn.microsoft.com/en-us/library/az4se3k1(loband).aspx)
+- [MSDN: Custom Date and Time Format Strings](http://msdn.microsoft.com/en-us/library/8kb3ddd4(loband).aspx)
+
+###Example XSLT Usage:
+This displays the current node's update date in the format of June 15, 2009
+
+
+
+
+
+
+##GetXmlNodeById
+Use this to fetch subnodes from a 'placeholder' document type.
+
+###XSLT Example
+This example makes it possible for you to fetch subnodes from a 'placeholder'.
+
+
+
+If you for instance have a 'placeholder' in your tree called "Locations" you can get the different locations by retrieving the placeholder id as shown above.
+
+Then you could for instance loop through all the subnodes by writing something like this
+
+###XSLT Example
+
+ -
+
+
+
+
+##AddJquery
+Use this to insert a reference to the Jquery library in the section of your html. It gives you the possibility to only add Jquery to certain pages, which are based on the template(s) you are using the XSLT macro on. For this to work, make sure to set runat="server" on the tag, i.e. .
+
+###XSLT Example
+
+
+
+##CurrentDate
+Use this to return the current date
+
+###XSLT Example
+
+
+
+##AllowedGroups
+Returns a node-set of member groups (roles) that have access to the restricted content document.
+
+ umbraco.library:AllowedGroups(int documentId, string path)
+
+An example of the returned XPathNodeIterator (as XML):
+
+
+ 1050
+ 1066
+ 1072
+
+
+The value of the `` are the Id of the Member Group.
+
+
+##ChangeContentType
+Use this to change to content type from html to the given content type. In the example below we change the content type to xml.
+
+###Example
+
+
+
+##DateDiff
+Use this method to get the difference between two dates in seconds, minutes or years.
+
+
+###XSLT Example
+This example will return an integer with the difference in years: 5. The second date is subtracted from the first date.
+
+
+
+
+The third parameter can be one of the following: "s", "m" or "y".
+
+###C# Example
+The result of the C# example will be 60 minutes.
+
+ int minutes = umbraco.library.DateDiff("16-02-2010 16:00", "16-02-2010 17:00", "m");
+
+
+
+##DateGreaterThanOrEqual
+returns true if firstDate >= secondDate otherwise false
+
+ umbraco.library:DateGreaterThanOrEqual( string firstDate, string secondDate )
+
+
+##DateGreaterThanOrEqualToday
+Allows you to select Data and filter via a date field, so you could select data from a specific node which had a date which was in the future or the same as today.
+
+
+
+
+
+You could use this method for Events or time specific data, this would save you using the publish at and remove at features in the admin section.
+
+And allow you to leave the data on the site which would be good for the search engines.
+
+
+##GetDictionaryItem(System.String)
+When you have set up a multi-lingual website you have probably created dictionary items in the Settings section of Umbraco. Now of course, you need to display these dictionary items in your pages or to be more specific in your XSLT.
+
+That's where the `GetDictionaryItem()` function comes in. To get the value of the dictionary item simply write the following code:
+
+
+This will output the dictionary item value on your page.
+
+You can of course also put the value in a variable like so:
+
+
+
+
+
+
+##GetDictionaryItems(System.String)
+This function has the same general purpose as the GetDictionaryItem() function. The difference comes into play when you have set up you dictionary items like this:
+
+- Dictionary
+ - ContactForm
+ - Name
+ - Email
+ - Message
+
+As you can see we have created some itmes under the ContactForm dictionary item. Setting up you dictionary like this means that you don't have to seperately call every single item in your XSLT. You can just call the ContactForm item once, and have access to all underlying items. Just create a variable that gets all your items:
+
+
+
+And then output the items you need wherever you need them:
+
+
+
+
+
+
+
+
+
+##GetHttpItem
+Retreive a value from the http collection
+
+
+
+##GetItem
+Use this to get the content of a field within a node. You can not access Umbraco set fields like nodeName and createDate with this method.
+
+###XSLT Example
+This will put into the variable "aliasContent" the text in the field with the alias 'pageTitle'.
+
+
+
+
+This example displays the page title of the parent page while process the 'node'.
+
+
News
+
+
+
+##GetMedia
+The method is used to get information of files in the media library - such as filename, size, height, width.
+
+###Parameters
+GetMedia(int MediaId, bool Deep);
+
+ Integer MediaId
+ Boolean Deep
+
+###Return value
+The method returns a XPathNodeIterator with the information of selected file.
+
+###Usage
+Getting the url of a media file with hardcoded ID
+
+
+
+Getting the url of a media file using a mediaPicker
+
+
+
+
+
+###How to render an image from XSLT
+Assuming the property alias is 'bannerImage' then:
+
+
+
+
+
+
+
+
+
+
+In the new syntax (Umbraco 4.5.1 onwards) this has changed to:
+
+
+
+
+
+
+
+
+
+##GetMember
+The "standard" properties of a member are stored as attributes in the `` element (of the XML that's returned from `umbraco.library:GetMember`).
+
+You can access them like this:
+
+
+ Name:
+ Login Name:
+ Email:
+
+** obviously, replace the "1066" with the id of the member you want to access - You could always pass in a variable
+
+
+##GetMemberName
+Returns the name as a string, of the member with a given Id
+
+
+
+
+
+##GetPreValueAsString
+Gets the umbraco data type prevalue with the specified Id as string.
+
+###Xslt Exemple
+
+
+###Razor Exemple
+ @{
+ var myValues = "7,8";
+ foreach(var id in myValues.Split(',')) {
+ var myStringValue = umbraco.library.GetPreValueAsString(Convert.ToInt32(id));
+
@myStringValue
+ }
+ }
+
+
+##GetPreValues
+Fetches a list of prevalues. "Prevalues" are predefined values/options attached to e.g. a drop down or checkbox list data type.
+
+
+##GetWeekDay
+GetWeekDay(String Date)
+String date - date from Umbraco XML or a hardcoded value. You could also call the CurrentDate() XSLT extension.
+
+###Usage
+
+
+
+###Return Value
+This method returns a string with the name of the day (Surprise! :-))
+
+##GetXmlAll
+Returns the entire xml document from the content cache
+
+
+
some value
+
+
+
+##GetXmlDocumentByUrl
+You can pass this extension a URL to an XML file (Such as an RSS feed or API results) and Umbraco will read it in and let you have all the normal XSLT tools to manipulate it
+
+For example I'll lets take the BBC sport RSS feed
+
+newsrss.bbc.co.uk/.../rss.xml
+
+and print out some data, here I create a variable which calls the `umbraco.library:GetXmlDocumentByUr`l extension and stores the XML
+
+
+
+Then the loop code using normal XSLT
+
+
+
+
+
+
+
+
+##GetXmlNodeByXPath
+This method allows you to pass in an XPath statement (as a string) to return the appropriate XmlNodes.
+
+Quick example of how to use the GetXmlNodeByXPath method:
+
+
+
+ /root/node[@level = 1 and string(data[@alias='umbracoNaviHide']) != '1']
+
+
+
+
+This example gets the top-level (@level = 1) nodes and dumps/outputs the XML in the page.
+
+You can also use this method to check to see if a node exists:
+
+ var node = umbraco.library.GetXmlNodeByXPath("//node[@nodeName='Something here' and contains(@path, '1234')]");
+
+The above will return nodes that match the queried @nodeName and @path.
+
+
+##GetXmlNodeCurrent
+Returns the XML for the currently viewed node:
+
+
+
+This is the same as:
+
+
+
+If using` xsl:include` to include other XSLT files into another. It is wise to use `umbraco.library:GetXmlNodeCurrent()` instead of `$currentPage`. This will minimize conflicts between XSLT files.
+
+
+
+
+##HasAccess
+`HasAccess()` is checking to see if a protected node is accessible to the current user. If it isn't protected then the whole test will fail.
+
+
+
+
+
+
+
+
+##HtmlEncode
+Standard method, the same as you would use in day to day ASP.NET coding - Takes a string and HTML Encodes it
+
+
+
+
+##IsProtected
+Use this to determine if a node is protected or not. Returns bool(false/true)
+
+
+
+
+##LongDate
+The method is used to get return a formatted date from Umbraco's XML.
+
+The method returns a string in the form:
+
+22 April 2006 18:43:00
+
+###Usage
+
+
+
+###LongDate(String date, bool includeTime, String separator);
+- String date - date from Umbraco XML.
+- Boolean includeTime - include the time as well as the date.
+- String separator - character(s) to separate date and time components.
+
+
+
+##md5
+Creates an MD5 hash out of a string:
+
+
+
+##NiceUrlFullPath
+Does the same as NiceUrl except it returns the full url with a domain for a given node in the Umbraco content section.
+
+###XSLT Example
+This example will return the friendly url for the Parent page that is currently being viewed.
+
+
+
+
+
+##QueryForNode
+Gets the path back to the parent node of a given node. For instance, if page 1057 was 3 pages deep and you called this function you might get:
+
+
+ [@id = 1048]/node [@id = 1050]/node [@id = 1057]
+
+
+##RegisterJavaScriptFile
+This is a really useful when you write XSLT macros that require a Javascript library to be registered in the head block, rather than having to remember to add the LINK to the head section you can include it in the XSLT and that way you have easily deployable functionality that can be quickly added to a page with a single macro insert.
+
+###Example
+
+
+**Note**: You MUST have runat="server" on the HEAD tag in your HTML template
+
+
+##RemoveFirstParagraphTag
+Removes the starting and ending paragraph tags in a string. Returns the string without starting and endning paragraph tags
+
+Input: string
+Output: the string without starting or ending paragraph tags.
+
+Currently (v4.7.1) this code strips one
from the front, and one
from the end. Trimming is not done, and nothing is done if the string is less than 5 characters long. If the string starts with a P tag but does not end with a closing P tag, only the opening P tag is removed (middle-content of the string is not modified).
+
+###Example
+
+
+If you need to trim the string, use the xslt function normalize-space():
+
+
+
+
+##Replace
+Replace(String text, String oldValue, String newValue)
+
+- String text - the text that contains the charachters you want to replace
+- String oldValue - The charachters you want to replace
+- String newValue - The charachters, which should be used instead
+
+###Usage
+
+
+
+##ReplaceLineBreaks
+Use this to replace non HTML line breaks with HTML` ` breaks.
+
+The Simple Editor datatype does not HTML encode line breaks so the following code can be used for that.
+
+###Usage
+
+
+
+##Request
+##RequestCookies
+##RequestForm
+##RequestQueryString
+##RequestServerVariables
+##SendMail
+##Session
+##SessionId
+##setCookie
+##setSession
+##ShortDate
+##ShortDateWithGlobal
+##ShortDateWithTimeAndGlobal
+##ShortTime
+##Split
+##StripHtml
+##Tidy
+##TruncateString
+##UnPublishSingleNode
+##UpdateDocumentCache
+##UrlEncode
+##GetXmlNodeById (1)
+##Item
+##ReplaceLineBreaks
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Events/Document-Events.md b/OurUmbraco.Site/Documentation/Reference/Events/Document-Events.md
new file mode 100644
index 00000000..d6369318
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Events/Document-Events.md
@@ -0,0 +1,129 @@
+#Document Events#
+
+The Document class is the most commonly used type when extending Umbraco using events.
+
+Document inherits from the CMSNode class, and will also have the Move and New events from there.
+
+
+
+
Event
+
Signature
+
Description
+
+
+
BeforeSave
+
(Document sender, SaveEventArgs args)
+
+ Raised before a document is saved from the UI, or when Document.Save() is called in the API.
+ NOTE: When the event is fired from the UI, then the "sender" will be the current document in the database, and not have the values that are about to be saved.
+
+
+
+
AfterSave
+
(Document sender, SaveEventArgs args)
+
+ Raised after a document is saved from the UI, or when Document.Save() is called in the API.
+
+
+
+
BeforeSendToPublish
+
(Document sender, SendToPublishEventArgs args)
+
+ Raised before a document is sent for publication. Setting args.Cancel = true will cancel the send.
+
+
+
+
AfterSendToPublish
+
(Document sender, SendToPublishEventArgs args)
+
+ Raised after a document is sent to publishing.
+
+
+
+
BeforePublish
+
(Document sender, PublishEventArgs args)
+
+ Raised before a document is published. Setting args.Cancel = true will cancel the publishing.
+
+
+
+
AfterPublish
+
(Document sender, PublishEventArgs args)
+
+ Raised after a document is published.
+
+
+
+
BeforeUnPublish
+
(Document sender, UnPublishEventArgs args)
+
+ Raised before a document is unpublished. Setting args.Cancel = true will cancel the unpublishing.
+
+
+
+
AfterUnPublish
+
(Document sender, UnPublishEventArgs args)
+
+ Raised after a document is unpublished.
+
+
+
+
BeforeCopy
+
(Document sender, CopyEventArgs args)
+
+ Raised before a document is copied. Setting args.Cancel = true will cancel the copy.
+ args.CopyTo contains the id of the target parent node.
+
+
+
+
AfterCopy
+
(Document sender, CopyEventArgs args)
+
+ Raised after a document is copied.
+ args.NewDocument contains the newly created copy.
+
+
+
+
BeforeMoveToTrash
+
(Document sender, MoveToTrashEventArgs args)
+
+ Raised before a document is moved to trash. Setting args.Cancel = true will cancel the move.
+
+
+
+
AfterMoveToTrash
+
(Document sender, MoveToTrashEventArgs args)
+
+ Raised after a document is moved to trash.
+
+
+
+
BeforeDelete
+
(Document sender, DeleteEventArgs args)
+
+ Raised before a document is deleted from the trashbin. Setting args.Cancel = true will cancel the delete.
+
+
+
+
AfterDelete
+
(Document sender, DeleteEventArgs args)
+
+ Raised after a document is delete from the trashbin.
+
+
+
+
BeforeRollBack
+
(Document sender, RollBackEventArgs args)
+
+ Raised before a document is rolled back to a previous version. Setting args.Cancel = true will cancel the rollback.
+
+
+
+
AfterRollBack
+
(Document sender, RollBackEventArgs args)
+
+ Raised after a document is rolled back to a previous version.
+
+
+
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Events/index.md b/OurUmbraco.Site/Documentation/Reference/Events/index.md
new file mode 100644
index 00000000..dc14d29d
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Events/index.md
@@ -0,0 +1,47 @@
+#Using events#
+
+Umbraco uses .Net events to allow you to hook into the workflow processes for the backoffice. For example you might want to execute some code every time a page is published. Events allow you to do that.
+
+[Document Events](Document-Events.md)
+
+## Before and After events ##
+
+Typically, the events available exist in pairs, with a Before and After event. For example the Document class has the concept of publishing, and fires events when this occurs. In that case there is both a Document.BeforePublish and Document.AfterPublish event.
+
+Which one you want to use depends on what you want to achieve. If you want to be able to cancel the action, the you would use the Before event, and use the eventargs to cancel it. See the sample handler further down. If you want to execute some code after the publishing has suceeded, then you would use the After event.
+
+## Using ApplicationBase to register events ##
+
+Umbraco includes the ApplicationBase class which is used for registering your code in umbraco automatically when umbraco loads.
+
+This sample shows how to setup an ApplicationBase and make it subscribe to the before publishing events.
+
+Remember to add the cms.dll, businesslogic.dll, umbraco.dll and interfaces.dll to your project.
+
+Add references to the right namespaces at the top of your .cs file, and inherit the ApplicationBase and place the event code in the default class constructor.
+
+ using umbraco.BusinessLogic;
+ using umbraco.cms.businesslogic;
+ using umbraco.cms.businesslogic.web;
+
+ namespace MyApp
+ {
+ public class BeforePublishHandler : ApplicationBase
+ {
+
+ public AppBase()
+ {
+ Document.BeforePublish += Document_BeforePublish;
+ }
+
+ private void Document_BeforePublish(Document sender, PublishEventArgs e)
+ {
+ //Do what you need to do. In this case logging to the Umbraco log
+ Log.Add(LogTypes.Debug, sender.Id, "the document " + sender.Text + " is about to be published");
+
+ //cancel the publishing if you want.
+ e.Cancel = true;
+ }
+ }
+ }
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Management/Documents/document.md b/OurUmbraco.Site/Documentation/Reference/Management/Documents/document.md
new file mode 100644
index 00000000..6f556cea
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Management/Documents/document.md
@@ -0,0 +1,270 @@
+#Document
+The `Document` class represents a single item in the content tree, its values are
+fetched directly from the database, not from the cache. **Notice** the Document class should strictly be used for simple CRUD operations, not complex queries, as it is not flexible nor fast enough for this.
+
+All documents are versioned, so on each indiviual change, a new version is stored. Past versions can only be retrieved from the `Document` api, not from the cache.
+
+ * **Namespace:** `umbraco.cms.businesslogic.web`
+ * **assembly:** `cms.dll`
+
+
+All samples in this document will require references to the following dlls:
+
+* cms.dll
+* businesslogic.dll
+
+All samples in this document will require the following usings:
+
+ using umbraco.cms.businesslogic.web;
+ using umbraco.BusinessLogic;
+
+
+##Properties
+
+###.Children
+Returns a `Document[]` containing all documents just below the given `Document`
+
+ var d = new Document(1234);
+ var children = d.Children;
+
+
+###.ContentType
+Returns a `ContentType` object representing the DocumentType used by the given `Document`
+
+ //return the alias of the document type used
+ var doc = new Document(1234);
+ var docType = doc.ContentType;
+ return doctype.Alias;
+
+
+###.CreateDateTime;
+Returns the `DateTime` object telling when the document was created.
+
+ var doc = Document.MakeNew("name", doctype, user, -1);
+ return doc.CreateDateTime;
+
+
+###.Creator
+Returns the `User` who created the document
+
+ var doc = new Document(1234);
+ var authorName = doc.Creator.Name;
+
+
+###.ExpireDate
+If set, returns the `DateTime` the Document is meant to be unpublished and become unavailable on the website
+
+###.getProperties
+Returns a `Property[]` containing all property data of the given `Document`, each property has a value, a alias
+
+ var doc = new Document(1223);
+ foreach(var prop in doc.getProperties){
+ var value = (DateTime)p.Value;
+ var alias = p.PropertyType.Alias;
+ }
+
+###.getProperty
+Returns or sets a `Property` describing the property with a given alias
+
+ var doc = new Document(1223);
+ var bodyText = doc.getProperty("bodyText);
+
+ //get the bodyText value
+ var bodyTextValue = bodyText.Value
+
+ //sets the bodyText value
+ bodytext.Value = "
hello
";
+
+
+###.HasChildren
+Returns `Bool` indicating whether the given `Document` has any documents just below it
+
+
+###.Id
+Returns the unique `Document` Id as a `Int`, this ID is based on a Database identity field, and is therefore not safe to reference in code which are moved between different instances, use UniqueId instead.
+
+###.IsTrashed
+Returns a `Bool` indicating whether the given `Document` is currently in the recycle bin.
+
+
+###.Level;
+Returns the given `Document` level in the site hirachy as an `Int`. Documents placed at the root of the site, will return 1, documents just underneath will return 2, and so on.
+
+###.OptimizedMode
+Indicates whether the Document was initialized with a single SQL query, loading all data in one go, instead of lazy-loading each individual property.
+**Notice:** this indicator does in general not do anything internally.
+
+
+###.Parent
+Returns a `CMSNode` object, representing the Parent document, if no parent is available, an exception will be thrown. **Notice:** `CMSNode` is the object which `Document` inherits from, and does therefore not allow access to all properties.
+
+
+###.ParentId
+Returns the parent `Document` Id as an `Int`
+
+###.Published
+Returns a Bool indicating whether the given `Document` is published and available on the website or not. **Notice:** the published flag does not check the current in-memory cache, so this flag is not a guarantee the Document is/is not available in the cache and the website
+
+###.Relations
+Returns a `Relation` array with all relations relevant to the given `Document`. This both returns parent and child relations
+
+ var doc = new Documnet(1234);
+ foreach(var rel in doc.Relations){
+ //returns a Relation object containing type, child, parent and ID
+ var child = rel.Child;
+ var type = rel.RelType.Alias;
+ }
+
+
+###.ReleaseDate
+If set, returns `DateTime` indicating when the `Document` should be published and made available on the website and cache.
+
+###.sortOrder
+Returns the given `Document` index, compared to sibling documents.
+
+###.Template
+Returns the ID of the currently set template as a `Int`
+
+###.Text
+Returns the name of the document as a `String`
+
+###.UniqueId
+Returns the `Guid` assigned to the Document during creation. This value is unique, and should never change, even if the document moved between instances.
+
+
+###.UpdateDate
+Returns a `DateTime` object, indicating the last the given Document was updated.
+
+###.User
+Returns the `User` who created the Document, same as `Creator`
+
+###.UserId;
+Returns the ID of the creator/user, as a `Int`
+
+###.Version;
+Returns the current Version ID as a `Guid`,
+For each change made to a document, its values are stored under a new Version. This version is identified by a `Guid`
+
+###.VersionDate
+Returns the `DateTime` this specific version was created, not the Document itself.
+
+
+###.Writer
+Returns a `User` object, of the user who made the latest edit on the Document.
+
+
+##Methods
+###.Copy(1233, User, false)
+Recreates the given Document as a child of the given Id, a User is based for the audit trailm and a boolean value indicates whether a relation between original and copy should be made. Method returns the copy as a `Document`
+
+ //Get the document to copy
+ var doc = new Document(1234);
+ //create as a child of node with Id 1234
+ doc.Copy(1234, new User(0), true);
+
+
+###.delete(true)
+Deletes the given `Document`, a `Bool` can be passed to indicate whether the Document should be deleted, or simply moved to the Recycle bin, **notice** you will need to remove the document from the cache as well
+
+ var doc = new Document(1223);
+ umbraco.library.UnpublishSingleDocument(doc.id);
+ doc.delete(true);
+
+###.getProperty(alias)
+Returns a `Property` with the given alias. The properties contain the document data, the property data is instantly persisted.
+
+ var doc = new Document(1234);
+ doc.getProperty("bodyText").Value = "
hello
";
+ doc.getProperty("dateField").Valye = DateTime.Now;
+
+
+###.GetTextPath()
+Returns the parent Ids as a path to the given `Document`. If a document exist underneath a Document with ID 1234, which then exist under a document with id 5555, the TextPath returned is -1,5555,1234
+
+###.GetVersions()
+Returns a `DocumentVersionList` containing all previous versions of the given Document. each version contains a date, the name of the Document, user, and the unque version ID.
+
+ foreach(var version in d.GetVersions()){
+ var date = version.Date;
+ var name = version.Text;
+ var uniqueId = version.Version
+ }
+
+###.HasPendingChanges()
+Returns a `Bool` indicating whether there has been any property/data changes since the last time this Document was published.
+
+###.HasPublishedVersion()
+Returns a `Bool` indicating whether the given Document has been published previously.
+
+###.Move(1234)
+Moves the Document, and places it as a child under the the Document with the given ID.
+
+ //get the document
+ var doc = new Document(1234);
+ //move it underneath the document with Id 5555
+ doc.Move(5555);
+ //publish the changes
+ doc.Publish()
+ umbraco.library.UpdateDocumentCache(doc.Id);
+
+###.Publish(user)
+Creates a new Xml Representation of the current Document, and creates a new version of document, for continued editing.
+**Notice:** Publishing a document, is a 2 step operation, first exposing a Xml representation of the current state of the document, and afterwards pushing this xml into the in memory xml cache.
+
+ //Get the document
+ var doc = new Document(1234);
+
+ //create and store a xml representation of the document
+ doc.Publish(user);
+
+ //tell the runtime to retrieve the xml from the database and store in cache
+ umbraco.library.UpdateDocumentCache(doc.Id);
+
+
+###.PublishWithChildrenWithResult(user)
+Publishes the given Document using Publish(user) and then performs the same .Publish() on all children.
+
+###.PublishWithResult(user)
+Does the same thing as .Publish(user) but returns a `Bool` indicating whether the publish was successfull.
+
+###.PublishWithSubs(user)
+
+###.RemoveTemplate()
+Sets the template ID to `Null` on the given Document
+
+###.RollBack(VersionId, user)
+Rolls the `Document` back to the version with the a given Version Id. A user must be passed for the Document audit trail.
+
+###.Save()
+Saves the latest changes on the Document. This triggers the Before/After save events. **Notice** this method is nothing but a stub, as all properties are instantly persisted.
+
+###.SendToPublication(user)
+Sends the Document to publishing, which triggers notifications to the appropriate admins, subscribing to notifications. Send to publishing, is only used in case the current `User` does not have permission to publish a document.
+
+###.ToPreviewXml(XmlDocument)
+Returns a `XmlNode` containing the Document data, based off the latest changes, even unpublished changes, is only used for the internal Preview functionality
+
+###.ToXml(xmldocument, true)
+Returns a `XmlNode` containing the Document data, based off the latest published changes. Is used when the published document is send to the in-memory cache.
+
+###.UnPublish()
+Sets the Published flag to false, which means the Xml will not be included in the Xml Cache the next time it refreshes. **Notice:** to force the document out of the cache instantly, a call to library.UnpublishSingleNode()
+
+ //get the document
+ var doc = new Document(1234);
+
+ //remove it from the cache
+ umbraco.library.UnpublishSingleNode(doc.id);
+
+ //mark it as unpublished
+ doc.UnPublish();
+
+
+###.XmlGenerate(XmlDocument)
+Generates a xml representation of the `Document` and saves it in the database.
+
+###.XmlNodeRefresh(XmlDocument, ref XmlNode)
+Refreshes the given `XmlNode` with data from the Document properties.
+
+###.XmlPopulate(XmlDocument, ref XmlNode, true)
+Populates the given `XmlNode` with data from the Document Properties. A boolean parameter can be passed to indicate whether all child document xml should be append as well.
diff --git a/OurUmbraco.Site/Documentation/Reference/Management/Documents/index.md b/OurUmbraco.Site/Documentation/Reference/Management/Documents/index.md
new file mode 100644
index 00000000..962aed6c
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Management/Documents/index.md
@@ -0,0 +1,150 @@
+#Documents
+
+The `Document` object represents a page, as it is stored in the database. All calls to the document api, goes directly to the database. It is therefore **not** recommend to be used a query API, as there are faster alternatives which interacts directly with the in-memory content instead.
+
+All documents are versioned, so on each indiviual change, a new version is stored. Past versions can only be retrieved from the `Document` api, not from the cache.
+
+ * **Namespace:** `umbraco.cms.businesslogic.web`
+ * **assembly:** `cms.dll`
+
+
+All samples in this document will require references to the following dlls:
+
+* cms.dll
+* businesslogic.dll
+
+All samples in this document will require the following usings:
+
+ using umbraco.cms.businesslogic.web;
+ using umbraco.BusinessLogic;
+
+##Constructor
+The Document constructor is used to retrive a Document object with a given Id or Guid, there are optional parameters, which allows one to control setup and version.
+
+For all constructors, a null is returned if a document is not found with the given id, guid or version.
+
+###Get Document by Id
+Retrieves the latest version of a `Document` by its id, which is a Database identity `int`.
+**Notice:** it is recommend to avoid the use of hardcoded Id's in your code, as these will change between environments.
+
+ Document d = new Document(1234);
+
+###Get Document by Guid
+Retrieves the latest version of a `Document` by its guid, which is set on creation
+
+ Document d = new Document(guid);
+
+if noSetup is set to true, only the Id, property is set on the returned `Document` object, all other properties will not be loaded.
+
+ Document d = new Document(guid, true);
+
+###Get Document by version
+All documents in umbraco is versioned. So everytime a document is changed, a new version is stored seperately. All versions get a unique Id assigned. The document returned will reflect the state of the document data in that specific version.
+
+
+ Document d = new Document(1234 versionGuid);
+
+##Creating a Document and setting properties
+To create and store a `Document` you need a `DocumentType`, calling `MakeNew()` the document is instantly persisted and property values can be set. A property expects a object so any value can be set, however, ensure the datatype associated with the property can handle the valuetype.
+
+ DocumentType dt = DocumentType.GetByAlias("Textpage");
+ User u = new User(0);
+ int parentId = 1234;
+
+ Document d = Document.MakeNew("name of document", dt, u, parentId);
+ //set a string
+ d.getProperty("bodyText").Value = "Hello");
+ //set a date
+ d.getProperty("date").Value = DateTime.Now;
+ //set a HttpPostedFile
+ d.getProperty("upload").Value = Request.Files[0];
+
+ //publish the document
+ d.Publish(user);
+
+ //Inform the cache it should update
+ umbraco.librarh.UpdateDocumentCache(d.Id);
+
+##[Document methods and properties](document.md)
+The `Document` class itself has a big collection of methods and properties, please see the seperate [Document](document.md) page for this.
+
+
+##Static methods
+###.CountSubs(1233, false);
+Counts the number as a `int` of children below a given document, optional parameter to only return number of published children.
+
+ int result = Document.CountSubs(1233, false);
+
+###.DeleteFromType(type);
+Deletes all documents with a given document type
+
+ var dt = DocumentType.GetByAlias("newsArticle");
+ Document.DeleteFromType(dt);
+
+###.GetChildrenBySearch(1223, "wat");
+Returns children as a `List` under a given document and filtered by a search string. **notice** this only performs a simple sql `LIKE` against document names and is not recommended as a website search.
+
+ var list = Document.GetChildrenBySearch(1223, "wat");
+
+###.GetChildrenForTree(1233);
+Returns children as a `Document[]` under a given document ID. This method is strictly used for the backoffice trees, and can be expected to change status to internal.
+
+ var list = Document.GetChildrenForTree(1233);
+
+###.GetContentFromVersion(new Guid());
+Returns a `Content` object from a given version guid, representing the state of the document in this specific version
+
+ Content version = Document.GetContentFromVersion(new Guid());
+
+###.GetDocumentsForExpiration();
+Returns a `Document` array with documents which are ready to be unpublished, due to the removal date set on the document
+
+ var list = Document.GetDocumentsForExpiration();
+
+###.GetDocumentsForRelease();
+Returns a `Document` array with documents, which are ready to be published, due to the publish at date, set on the document.
+
+ var list = Document.GetDocumentsForRelease();
+
+###.GetDocumentsOfDocumentType(1223);
+Returns documents as a `IEnumerable` using the document type with a give ID.
+
+ var list = Document.GetDocumentsOfDocumentType(1223);
+
+###.GetRootDocuments();
+Returns all documents in the root of the content tree as a `Document` array
+
+ var list = Document.GetRootDocuments();
+
+###.Import(1234, new User(0), XmlElement);
+Imports data from a `XmlElement` and stores it as a new child `Document` under the given parent Id. Returns the new document id, as a `Int`. The data format for the xml, can be found under [Packaging](../Packaging/index.md)
+
+ var pageId = Document.Import(1234, new User(0), XmlElement);
+
+
+###.IsDocument(1234);
+Returns a `bool` to indicate whether the given Id is `Document` or not.
+
+ var isDocument = Document.IsDocument(1234);
+
+###.MakeNew("name", doctype, User, -1);
+Creates a new Document with a given name and a given document type. This method also requires a `User` object to define the document creator, as well as the ID of the parent node. If the document should be placed in the root of the content tree, use the parent Id -1.
+
+ var documentType = DocumentType.GetByAlias("newsArticle");
+ var owner = new User("admin");
+ var document = Document.MakeNew("My article", documentType, owner , -1);
+
+###.RegeneratePreviews();
+Regenerates the xml file required for document previews used by the runtime.
+
+ Document.RegeneratePreviews();
+
+###.RemoveTemplateFromDocument(1234);
+Sets the template to `NULL` on all documents with the given template Id. This method is triggered on template delete, and should therefore be considered a internal method.
+
+ Document.RemoveTemplateFromDocument(1234);
+
+###.RePublishAll();
+Clears the Xml representation of all documents from the cmsContentXml table and then recreates it for each individual published document in the database.
+
+ Document.RePublishAll();
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Management/Media/index.md b/OurUmbraco.Site/Documentation/Reference/Management/Media/index.md
new file mode 100644
index 00000000..f0c74864
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Management/Media/index.md
@@ -0,0 +1,97 @@
+#Medias
+
+The `Media` object represents a item in the media tree, as it is stored in the database. All calls to the media api, goes directly to the database. It is therefore **not** recommend to be used a query API, as there are faster alternatives which interacts directly with the in-memory content instead.
+
+ * **Namespace:** `umbraco.cms.businesslogic.media`
+ * **assembly:** `cms.dll`
+
+
+All samples in this document will require references to the following dlls:
+
+* cms.dll
+* businesslogic.dll
+
+All samples in this document will require the following usings:
+
+ using umbraco.cms.businesslogic.media;
+ using umbraco.BusinessLogic;
+
+##Constructor
+The Media constructor is used to retrive a Media object with a given Id or Guid, there are optional parameters, which allows one to control setup and version.
+
+For all constructors, a null is returned if a Media is not found with the given id, guid or version.
+
+###Get Media by Id
+Retrieves the latest version of a `Media` by its id, which is a Database identity `int`.
+**Notice:** it is recommend to avoid the use of hardcoded Id's in your code, as these will change between environments.
+
+ Media d = new Media(1234);
+
+###Get Media by Guid
+Retrieves the latest version of a `Media` by its guid, which is set on creation
+
+ Media d = new Media(guid);
+
+if noSetup is set to true, only the Id, property is set on the returned `Media` object, all other properties will not be loaded.
+
+ Media d = new Media(guid, true);
+
+##Creating a Media item and setting properties
+To create and store a `Media` you need a `MediaType`, calling `MakeNew()` the media is instantly persisted and property values can be set. A property expects a object so any value can be set, however, ensure the datatype associated with the property can handle the valuetype.
+
+ MediaType dt =MediaType.GetByAlias("Textpage");
+ User u = new User(0);
+ int parentId = 1234;
+
+ Media d = Media.MakeNew("name of media", dt, u, parentId);
+ //set a string
+ d.getProperty("bodyText").Value = "Hello");
+ //set a date
+ d.getProperty("date").Value = DateTime.Now;
+ //set a HttpPostedFile
+ d.getProperty("umbracoFile").Value = Request.Files[0];
+
+
+##[Media methods and properties](media.md)
+The `Media` class itself has a big collection of methods and properties, please see the seperate [Media](media.md) page for this.
+
+
+##Static methods
+###.CountSubs(1233, false);
+Counts the number as a `int` of children below a given Media, optional parameter to only return number of published children.
+
+ int result = Media.CountSubs(1233, false);
+
+###.DeleteFromType(type);
+Deletes all Medias with a given Media type
+
+ var dt = MediaType.GetByAlias("newsArticle");
+ Media.DeleteFromType(dt);
+
+###.GetChildrenForTree(1233);
+Returns children as a `Media[]` under a given media ID. This method is strictly used for the backoffice trees, and can be expected to change status to internal.
+
+ var list = Media.GetChildrenForTree(1233);
+
+###.GetMediaOfMediaType(1223);
+Returns media items as a `IEnumerable` using the media type with a give ID.
+
+ var list = Media.GetMediasOfMediaType(1223);
+
+###.GetRootMedia();
+Returns all Medias in the root of the tree as a `Media` array
+
+ var list = Media.GetRootMedia();
+
+
+###.MakeNew("name", mediatype, User, -1);
+Creates a new Media with a given name and a given media type. This method also requires a `User` object to define the media creator, as well as the ID of the parent node. If the media should be placed in the root of the content tree, use the parent Id -1.
+
+ var mediaType = MediaType.GetByAlias("newsArticle");
+ var owner = new User("admin");
+ var Media = Media.MakeNew("My article", MediaType, owner , -1);
+
+###.RegeneratePreviews();
+Regenerates the xml file required for Media previews used by the runtime.
+
+ Media.RegeneratePreviews();
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Management/Media/media.md b/OurUmbraco.Site/Documentation/Reference/Management/Media/media.md
new file mode 100644
index 00000000..6741bfaf
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Management/Media/media.md
@@ -0,0 +1,150 @@
+#Media
+The `Media` class represents a single item in the media tree, its values are
+fetched directly from the database, not from the cache. **Notice** the Media class should strictly be used for simple CRUD operations, not complex queries, as it is not flexible nor fast enough for this.
+
+Media is not versioned, unlike Documents
+
+ * **Namespace:** `umbraco.cms.businesslogic.media`
+ * **assembly:** `cms.dll`
+
+
+All samples in this document will require references to the following dlls:
+
+* cms.dll
+* businesslogic.dll
+
+All samples in this document will require the following usings:
+
+ using umbraco.cms.businesslogic.media;
+ using umbraco.BusinessLogic;
+
+
+##Properties
+
+###.Children
+Returns a `Media[]` containing all Media items just below the given `Media`
+
+ var media = new Media(1234);
+ var children = media.Children;
+
+
+###.ContentType
+Returns a `ContentType` object representing the MediaType used by the given `Media`
+
+ //return the alias of the Media type used
+ var media = new Media(1234);
+ var mediaType = media.ContentType;
+ return mediatype.Alias;
+
+
+###.CreateDateTime;
+Returns the `DateTime` object telling when the Media was created.
+
+ var media = Media.MakeNew("name", doctype, user, -1);
+ return media.CreateDateTime;
+
+
+###.getProperties
+Returns a `Property[]` containing all property data of the given `Media`, each property has a value, a alias
+
+ var media = new Media(1223);
+ foreach(var prop in media.getProperties){
+ var value = (DateTime)p.Value;
+ var alias = p.PropertyType.Alias;
+ }
+
+###.HasChildren
+Returns `Bool` indicating whether the given `Media` has any Medias just below it
+
+
+###.Id
+Returns the unique `Media` Id as a `Int`, this ID is based on a Database identity field, and is therefore not safe to reference in code which are moved between different instances, use UniqueId instead.
+
+###.IsTrashed
+Returns a `Bool` indicating whether the given `Media` is currently in the recycle bin.
+
+###.Level;
+Returns the given `Media` level in the site hirachy as an `Int`. Medias placed at the root of the site, will return 1, Medias just underneath will return 2, and so on.
+
+###.Parent
+Returns a `CMSNode` object, representing the Parent Media, if no parent is available, an exception will be thrown. **Notice:** `CMSNode` is the object which `Media` inherits from, and does therefore not allow access to all properties.
+
+###.ParentId
+Returns the parent `Media` Id as an `Int`
+
+###.Relations
+Returns a `Relation` array with all relations relevant to the given `Media`. This both returns parent and child relations
+
+ var media = new Media(1234);
+ foreach(var rel in media.Relations){
+ //returns a Relation object containing type, child, parent and ID
+ var child = rel.Child;
+ var type = rel.RelType.Alias;
+ }
+
+
+###.sortOrder
+Returns the given `Media` index, compared to sibling Medias.
+
+###.Text
+Returns the name of the Media as a `String`
+
+###.UniqueId
+Returns the `Guid` assigned to the Media during creation. This value is unique, and should never change, even if the Media moved between instances.
+
+###.User
+Returns the `User` who created the Media, same as `Creator`
+
+###.UserId;
+Returns the ID of the creator/user, as a `Int`
+
+##Methods
+###.Copy(1233, User, false)
+Recreates the given Media as a child of the given Id, a User is based for the audit trailm and a boolean value indicates whether a relation between original and copy should be made. Method returns the copy as a `Media`
+
+ //Get the Media to copy
+ var media = new Media(1234);
+ //create as a child of node with Id 1234
+ media.Copy(1234, new User(0), true);
+
+
+###.delete(true)
+Deletes the given `Media`, a `Bool` can be passed to indicate whether the Media should be deleted, or simply moved to the Recycle bin, **notice** you will need to remove the Media from the cache as well
+
+ var media = new Media(1223);
+ umbraco.library.UnpublishSingleMedia(media.id);
+ media.delete(true);
+
+###.getProperty(alias)
+Returns a `Property` with the given alias. The properties contain the Media data, the property data is instantly persisted.
+
+ var media = new Media(1234);
+ media.getProperty("bodyText").Value = "
hello
";
+ media.getProperty("dateField").Value = DateTime.Now;
+
+###.Move(1234)
+Moves the Media, and places it as a child under the the Media with the given ID.
+
+ //get the Media
+ var media = new Media(1234);
+ //move it underneath the Media with Id 5555
+ media.Move(5555);
+ //publish the changes
+ media.Publish()
+ umbraco.library.UpdateMediaCache(media.Id);
+
+
+###.Save()
+Saves the latest changes on the Media. This triggers the Before/After save events. **Notice** this method is nothing but a stub, as all properties are instantly persisted.
+
+###.ToXml(xmlMedia, true)
+Returns a `XmlNode` containing the Media data, based off the latest published changes. Is used when the published Media is send to the in-memory cache.
+
+###.XmlGenerate(XmlMedia)
+Generates a xml representation of the `Media` and saves it in the database.
+
+###.XmlNodeRefresh(XmlMedia, ref XmlNode)
+Refreshes the given `XmlNode` with data from the Media properties.
+
+###.XmlPopulate(XmlMedia, ref XmlNode, true)
+Populates the given `XmlNode` with data from the Media Properties. A boolean parameter can be passed to indicate whether all child Media xml should be append as well.
diff --git a/OurUmbraco.Site/Documentation/Reference/Management/Relations/index.md b/OurUmbraco.Site/Documentation/Reference/Management/Relations/index.md
new file mode 100644
index 00000000..1dacfad5
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Management/Relations/index.md
@@ -0,0 +1,79 @@
+#Relations
+
+_The `Relation` object represents a connection between 2 items stored in Umbraco, a parent and a child item. All obejcts in a relation must be stored in Umbraco, and have a reference in the UmbracoNode table, and a integer ID, it therefore not possible to build relations between a Umbraco object and a external piece of data._
+
+
+ * **Namespace:** `umbraco.cms.businesslogic.relation`
+ * **assembly:** `cms.dll`
+
+
+All samples in this document will require references to the following dlls:
+
+* cms.dll
+* businesslogic.dll
+
+All samples in this document will require the following usings:
+
+ using umbraco.cms.businesslogic.relation;
+ using umbraco.BusinessLogic;
+
+(see also: [uQuery Relation Extensions](../../Querying/uQuery/Relations.md))
+
+##Constructor
+The `Relation` constructor is used to retrive a Relation object with a given Id, a null is returned if no relation is found with the given Id.
+
+###Get Relation by Id
+Retrieves the `Relation` by its id, which is a Database identity `int`.
+
+ Relation r = new Relation(1234);
+
+##[Relation methods and properties](relation.md)
+The `Relation` class itself has a big collection of methods and properties, please see the seperate [Relation](relation.md) page for this.
+
+##[RelationType methods and properties](relationtype.md)
+The `RelationType` class itself is described in a seperate [RelationType](relationtype.md) page.
+
+##Static methods
+
+###.GetRelations()
+Returns a `Relation[]` containing all relations for a given Node Id, as a optional parameter, you can filter by a specific `RelationType`
+
+ //get relations from a node with a given ID
+ var relations = Relation.GetRelations(1234);
+
+ foreach (var relation in relations)
+ {
+ var date = relation.CreateDate;
+ var parent = relation.Parent;
+ var child = relation.Child;
+ }
+
+ //get relations by a given ID and with a specific relation type
+ var relType = RelationType.GetByAlias("myRelation");
+ var relations = Relation.GetRelations(1234, relType);
+
+###.GetRelationsAsList()
+Returns a `List` containing all relations for a given Node Id, as a optional parameter, you can filter by a specific `RelationType`
+
+ //get relations from a node with a given ID
+ var relations = Relation.GetRelationsAsList(1234);
+
+ foreach (var relation in relations)
+ {
+ var date = relation.CreateDate;
+ var parent = relation.Parent;
+ var child = relation.Child;
+ }
+
+###.IsRelated
+Returns a `Boolean` indicating whether 2 Ids have a relation, as a optional parameter you can filter by a specific `RelationTyoe`
+
+ var relType = RelationType.GetByAlias("myRelation");
+ bool isRelated= Relation.IsRelated(parentId, childId, reltype);
+
+###.MakeNew()
+Creates a new relation between a parent Id, and a child Id, of a given RelationType, a comment can be attached to creation. **Note** to create a new relation, you will need a RelationType, please see the [RelationType](relationtype.md) page for this.
+
+ var relType = RelationType.GetByAlias("myRelation");
+ Relation.MakeNew(ParentId, ChildId, relType, "This is a new relation")
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Management/Relations/relation.md b/OurUmbraco.Site/Documentation/Reference/Management/Relations/relation.md
new file mode 100644
index 00000000..2f3ef451
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Management/Relations/relation.md
@@ -0,0 +1,65 @@
+#Relation
+
+_The `Relation` object represents a connection between 2 items stored in Umbraco, a parent and a child item. All obejcts in a relation must be stored in Umbraco, and have a reference in the UmbracoNode table, and a integer ID, it therefore not possible to build relations between a Umbraco object and a external piece of data._
+
+ * **Namespace:** `umbraco.cms.businesslogic.relation`
+ * **assembly:** `cms.dll`
+
+
+All samples in this document will require references to the following dlls:
+
+* cms.dll
+* businesslogic.dll
+
+All samples in this document will require the following usings:
+
+ using umbraco.cms.businesslogic.relation;
+ using umbraco.BusinessLogic;
+
+
+##Properties
+
+###.Child
+Returns or sets the child of the relation as a `CMSNode`
+
+ var relation = Relation.GetRelations(2332).First();
+
+ string name = relation.Child.Text;
+ int nodeId = relation.Child.Id;
+
+ relation.Child = new CmsNode(1234);
+
+###.Comment
+Returns or sets a comment attached to the Relation during creation
+
+ var relation = Relation.GetRelations(2332).First();
+ string comment = relation.Comment;
+
+ relation.Comment = "meh";
+
+###.CreateDate
+Returns the date, the relation was created as a `DateTime`
+
+ var relation = Relation.GetRelations(2332).First();
+ var date = relation.CreateDate;
+
+###.Id
+Returns the unique relation Id as a `Int`
+
+###.Parent
+Returns or sets the Parent of the relation as a `CMSNode`
+
+ var relation = Relation.GetRelations(2232).First();
+
+ string name = relation.Parent.Text;
+ int nodeId = relation.Parent.Id;
+
+ relation.Parent = new CmsNode(1234);
+
+##Methods
+
+###.Delete()
+Deletes the `Relation`
+
+###.Save()
+This is a Stub method, and does currently not do anything
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Management/Relations/relationtype.md b/OurUmbraco.Site/Documentation/Reference/Management/Relations/relationtype.md
new file mode 100644
index 00000000..ed4ee024
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Management/Relations/relationtype.md
@@ -0,0 +1,88 @@
+#RelationType
+
+_The `RelationType` describes the type of relation that can exist between 2 Umbraco objects. The type defines the Type the 2 objects can be, by referencing their Umbraco NodeObjectType Guids_
+
+_To create a relation, you must have a RelationType, and the types of obejcts you are relating, must match the rules set on the RelationType_
+
+ * **Namespace:** `umbraco.cms.businesslogic.relation`
+ * **assembly:** `cms.dll`
+
+All samples in this document will require references to the following dlls:
+
+* cms.dll
+* businesslogic.dll
+
+All samples in this document will require the following usings:
+
+ using umbraco.cms.businesslogic.relation;
+ using umbraco.BusinessLogic;
+
+##Creating a RelationType
+Unfortunately, the Umbraco 4 does not contain a .MakeNew() method for `RelationTypes`, you therefore have to manually execute a SQL script to create the type.
+
+ INSERT INTO [umbracoRelationType]
+ ([dual]
+ ,[parentObjectType]
+ ,[childObjectType]
+ ,[name]
+ ,[alias])
+ VALUES
+ (1
+ ,'C66BA18E-EAF3-4CFF-8A22-41B16D66A972'
+ ,'B796F64C-1F99-4FFB-B886-4BF4BC011A9C'
+ ,'My Document to Media Relation'
+ ,'doc2media');
+ GO
+
+##Available NodeObject Types
+When you create a RelationType like above, you will need the correct GUIDs from Umbraco to register the type correctly, below is a reference, with the most commons ones first.
+
+- Document: `C66BA18E-EAF3-4CFF-8A22-41B16D66A972 `
+- Media: `B796F64C-1F99-4FFB-B886-4BF4BC011A9C`
+- Template: `6FBDE604-4178-42CE-A10B-8A2600A2F07D`
+- Member: `39EB0F98-B348-42A1-8662-E7EB18487560`
+
+And the guids, not used so often:
+
+- ContentItemType: `7A333C54-6F43-40A4-86A2-18688DC7E532`
+- ROOT: `EA7D8624-4CFE-4578-A871-24AA946BF34D `
+- MemberType: `9B5416FB-E72F-45A9-A07B-5A9A2709CE43 `
+- MemberGroup: `366E63B9-880F-4E13-A61C-98069B029728 `
+- ContentItem: `10E2B09F-C28B-476D-B77A-AA686435E44A `
+- MediaType: `4EA4382B-2F5A-4C2B-9587-AE9B3CF3602E `
+- DocumentType: `A2CB7800-F571-4787-9638-BC48539A0EFB `
+- Recyclebin: `01BB7FF2-24DC-4C0C-95A2-C24EF72BBAC8 `
+- Stylesheet: `9F68DA4F-A3A8-44C2-8226-DCBD125E4840`
+- DataType: `30A2A501-1978-4DDB-A57B-F7EFED43BA3C `
+
+
+##Constructors
+
+
+##Static Methods
+###.GetAll()
+Returns all registered relation types as `IEnumerable`
+
+###.GetById(int)
+Returns a `RelationType` with with given Id, returns null if not found.
+
+###.GetByAlias(string)
+Returns a `RelationType` with a given alias, returns null if not found.
+
+##Properties
+###.Alias
+Returns or Sets the Alias of the type
+
+###.Dual
+Return or sets a Boolean, indicating whether this type of relation goes both ways between parent and child, if false, only child relations of a parent will returned, if true, also parent relations of a child will be returned.
+
+###.Id
+Returns the relation types unique id.
+
+###.Name
+Returns or sets the name of the relation.
+
+##Methods
+
+###.Save()
+Not currently in use.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Management/index.md b/OurUmbraco.Site/Documentation/Reference/Management/index.md
new file mode 100644
index 00000000..6395a3e8
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Management/index.md
@@ -0,0 +1,22 @@
+#Developers Reference
+
+The intended audience for these reference pages are .net developers, it is assumed the reader already has a knowledge of the basics of Umbraco and knows .net & c#
+
+
+##[Content Types](ContentTypes/index.md)
+Content Types, defines the data you work with, use the DocumentType and MediaType APIs to define what values editors can add to your pages. **Coming soon**
+
+##[Documents](Documents/index.md)
+Create, Update, Move, Copy, delete and publish documents.
+
+##[Media](Media/index.md)
+Create, Update, Move, Copy and delete media.
+
+##[Members](Members/index.md)
+Create, Update, Move, Copy, assign groups and delete members. **Coming soon**
+
+##[Relations](Relations/index.md)
+Creating and finding relations between umbraco items.
+
+##[Templates](Templates/index.md)
+Create templates programatically **Coming soon**
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/child-actions.md b/OurUmbraco.Site/Documentation/Reference/Mvc/child-actions.md
new file mode 100644
index 00000000..19697f9c
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/child-actions.md
@@ -0,0 +1,76 @@
+#Using MVC Child Actions in Umbraco
+
+**Applies to: Umbraco 4.10.0+**
+
+_This section will demonstrate how to use MVC Child Actions when rendering a page in Umbraco_
+
+##What is an MVC Child Action?
+
+A Child Action in ASP.Net MVC is kind of similar to that of a User Control in ASP.Net web forms. It allows for a controller to execute for a portion of the rendered area of a view, just like in Web Forms where you can execute a UserControl for a portion of the rendered area of a page.
+
+There is quite a lot of documentation on MVC Child Actions on the net, for example: http://[stackoverflow.com/questions/8886433/asp-net-mvc-child-actions](http://stackoverflow.com/questions/8886433/asp-net-mvc-child-actions)
+
+Child Actions can be very powerful especially when you want to have re-usable controller code to execute that you otherwise wouldn't want executing inside of your view. This also makes unit testing this code much easier since you only have to test controller code, not code in a view.
+
+##Creating a Child Action
+
+This documentation is going to use [SurfaceControllers](surface-controllers.md) to create child actions but if you want to create child actions with your own custom controllers with your own custom routing that will work too. Once you've created a SurfaceController, you just need to create an action (Note the ChildActionOnly attribute, this will ensure that this action is not routable via a URL):
+
+ public class MySearchController : SurfaceController
+ {
+ [ChildActionOnly]
+ public ActionResult SearchResults(QueryParameters query)
+ {
+ SearchResults result;
+ //TODO: do some searching (perhaps using Examine)
+ //using the information contained in the custom class QueryParameters
+
+ //return the SearchResults to the view
+ return PartialView("SearchResults", result);
+ }
+ }
+
+*NOTE: In this example we have used a SurfaceController to create the ChildAction and so long as you are using this Child Action in the context of rendering an Umbraco view, you will then have available all of the handy SurfaceController properties such as UmbracoHelper, UmbracoContext, etc...*
+
+##View Locations
+
+The same view locations apply to Partial Views returned from Child Actions as the ones listed here: [Partial Views](partial-views.md)
+
+Also not that since this example is using a Surface Controller and if we were shipping this controller as part of a package, then the ~/App_Plugins view location will work too. See [SurfaceControllers](surface-controllers.md) documentation under the heading *Plugin based controllers*.
+
+##Rendering a Child Action
+To render a child action in your view is really easy, call the Html.Action method, pass in the Action name and your controller's name and the route values including your model. In this case we are passing in a new instance of a custom QueryParameters class and using a current 'search' query string from the Http request:
+
+ @Html.Action("SearchResults", "MySearch",
+ new { query = new QueryParameters(Request.QueryString["search"]) })
+
+*NOTE: notice that we are creating an anonymous object with a property called 'query', that is because our Child Action method accepts a parameter called 'query', these must match in order to work.*
+
+This syntax becomes slightly different for Child Actions contained in Surface Controllers that are plugin based. The reason for this is because plugin based Surface Controllers are routed to an MVC Area, so we need to add the 'area' route parameter to this syntax. For an example, suppose we have the same class but it is marked to be a plugin based SurfaceController:
+
+ [SurfaceController("MyCustomSearchPackage")]
+ public class MySearchController : SurfaceController
+ {
+ [ChildActionOnly]
+ public ActionResult SearchResults(QueryParameters query)
+ {
+ SearchResults result;
+ //TODO: do some searching (perhaps using Examine)
+ //using the information contained in the custom class QueryParameters
+
+ //return the SearchResults to the view
+ return PartialView("SearchResults", result);
+ }
+ }
+
+Now the syntax to render a Child Action becomes:
+
+ @Html.Action("SearchResults", "MySearch",
+ new {
+ area = "MyCustomSearchPackage",
+ query = new QueryParameters(Request.QueryString["search"])
+ })
+
+the only thing that is changed is that we've told it to route to the 'area' called "MyCustomSearchPackage". If this syntax seems strange to you please note that this routing logic and syntax is standard and very common practice in ASP.Net MVC.
+
+More documentation regarding Child Actions and how to render them can be found on the net, a nice write up can also be found here: [http://haacked.com/archive/2009/11/18/aspnetmvc2-render-action.aspx](http://haacked.com/archive/2009/11/18/aspnetmvc2-render-action.aspx)
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/custom-controllers.md b/OurUmbraco.Site/Documentation/Reference/Mvc/custom-controllers.md
new file mode 100644
index 00000000..f9f83905
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/custom-controllers.md
@@ -0,0 +1,105 @@
+#Custom controllers (Hijacking Umbraco Routes)
+
+**Applies to: Umbraco 4.10.0+**
+
+_If you need complete control over how your pages are rendered then Hijacking Umbraco Routes is for you_
+
+##What is Hijacking Umbraco Routes?
+
+By default all of the front end routing is executed via the `Umbraco.Web.Mvc.RenderMvcController` Index Action which should work fine for most people. However, in some cases people may want complete control over this execution and may want their own Action to execute. Some reasons for this may be: to control exactly how views are rendered, custom/granular security for certain pages/templates or to be able to execute any custom code in the controller that renders the front end. The good news is that this is completely possible. This process is all about convention and it's really simple!
+
+##Creating a custom controller
+
+ It's easiest to demonstrate with an example : let's say you have a Document Type called 'Home'. You can create a custom locally declared controller in your MVC web project called 'HomeController' and ensure that it inherits from `Umbraco.Web.Mvc.RenderMvcController` and now all pages that are of document type 'Home' will be routed through your custom controller! Pretty easy right :-)
+OK so let's see how we can extend this concept. In order for you to run some code in your controller you'll need to override the Index Action. Here’s a quick example:
+
+ public class HomeController : Umbraco.Web.Mvc.RenderMvcController
+ {
+ public override ActionResult Index(RenderModel model)
+ {
+ //Do some stuff here, then return the base method
+ return base.Index(model);
+ }
+
+ }
+Now you can run any code that you want inside of that Action!
+
+##Routing via template
+
+To further extend this, we've also allowed routing to different Actions based on the Template that is being rendered. By default only the Index Action exists which will execute for all requests of the corresponding document type. However, if the template being rendered is called 'HomePage' and you have an Action on your controller called 'HomePage' then it will execute instead of the Index Action. As an example, say we have a Home Document Type which has 2 allowed Templates: ‘HomePage’ and ‘MobileHomePage’ and we only want to do some custom stuff for when the ‘MobileHomePage’ Template is executed:
+
+ public class HomeController : Umbraco.Web.Mvc.RenderMvcController
+ {
+ public ActionResult MobileHomePage(RenderModel model)
+ {
+ //Do some stuff here, the return the base Index method
+ return base.Index(model);
+ }
+ }
+
+##How the mapping works
+
+* Document Type name = controller name
+*
+Template name = action name, but if no action matches or is not specified then the 'Index' action will be executed.
+
+In the near future we will allow setting a custom default controller to execute for all requests instead of the standard UmbracoController. Currently you'd have to create a controller for every document type to have a custom controller execute for all requests.
+
+##Returning a view with a custom model
+
+If you want to return a custom model to a view then there's a few steps that need to be taken.
+
+###Changing the @inherits directive of your template
+
+First, the standard view that is created by Umbraco inherits from `Umbraco.Web.Mvc.UmbracoTemplatePage` which has a model defined of type `Umbraco.Web.Models.RenderModel`. You'll see the inherits directive at the top of the view as:
+
+ @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
+
+If you are returning a custom model, then this directive will need to change because your custom model will not be an instance of `Umbraco.Web.Models.RenderModel`. Instead change your @inherits directive to inherit from `Umbraco.Web.Mvc.UmbracoViewPage` where 'T' is the type of your custom model. So for exammple, if your custom model is of type 'MyCustomModel' then your @inherits directive will look like:
+
+ @inherits Umbraco.Web.Mvc.UmbracoViewPage
+
+###Returning the correct view from your controller
+
+In an example above we reference that you can use the following sytnax once you've hijacked a route:
+
+ //Do some stuff here, the return the base Index method
+ return base.Index(model);
+
+This will work but the object (model) that you pass to the `Index` method must be an instance of `Umbraco.Web.Models.RenderModel` which will probably not be the case if you have a custom model. So to return a custom model to the current Umbraco template, we need to use different syntax. Here's an example:
+
+ public class HomeController : Umbraco.Web.Mvc.RenderMvcController
+ {
+ public ActionResult MobileHomePage(RenderModel model)
+ {
+ //we will create a custom model
+ var myCustomModel = new MyCustomModel();
+
+ //TODO: assign some values to the custom model...
+
+ //now we need to return the current template with our custom model
+ //NOTE: This example shows 2 different syntaxes, one that works with
+ // Umbraco 4.10 and another that works with
+ // Umbraco 4.11+
+
+ //Example for 4.10:
+
+ //get the template name from the route values:
+ var template = ControllerContext.RouteData.Values["action"].ToString();
+ //return an empty content result if the template doesn't physically
+ //exist on the file system
+ if (!EnsurePhsyicalViewExists(template))
+ {
+ return Content("");
+ }
+ //return the current template with an instance of MyCustomModel
+ return View(template, myCustomModel);
+
+
+ //Example for 4.11+
+
+ //simply use the protected method CurrentTemplate, this does all of the
+ //above for you... must nicer.
+ return CurrentTemplate(myCustomModel);
+ }
+ }
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/custom-routes.md b/OurUmbraco.Site/Documentation/Reference/Mvc/custom-routes.md
new file mode 100644
index 00000000..bc0ca39a
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/custom-routes.md
@@ -0,0 +1,15 @@
+#Custom MVC Routes
+
+**Applies to: Umbraco 4.10.0+**
+
+_Documentation about how to setup your own custom controllers and routes that need to exist alongside of the Umbraco pipeline_
+
+##Where to put your routing logic?
+
+In 4.10.0+ we have a custom global.asax class called `Umbraco.Web.UmbracoApplication` which you **must** inherit from if you want your own custom global.asax. Putting your own custom routes in your global.asax class is easily done by overriding the method: `OnApplicationStarted`. Any custom route logic should be done in this method.
+
+Alternatively, if you require custom routes to be distributed in a package, or you just don't like global.asax for some reason you can create a custom `Umbraco.Web.IApplicationEventHandler` class. Then in your `OnApplicationStarted` method, you can add any custom routing logic you like.
+
+##Adding to the Umbraco ignore list
+
+In order for you to get your custom route working 100%, you should add them to the ignore list in the web.config in the umbracoReservedUrls or the umbracoReservedPaths.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/forms.md b/OurUmbraco.Site/Documentation/Reference/Mvc/forms.md
new file mode 100644
index 00000000..50048ed1
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/forms.md
@@ -0,0 +1,99 @@
+#Creating Html Forms
+
+**Applies to: Umbraco 4.10.0+**
+
+_Creating an HTML form to submit data with MVC in Umbraco is very easy! You'll need to create a SurfaceController, a 'View Model' class and use a handy HtmlHelper extension method called BeginUmbracoForm._
+
+##Creating a form - The View Model
+
+First off we need to define the data that will be submitted, this is done by creating a 'View Model' class. Here's an example:
+
+ public class CommentViewModel
+ {
+ [Required]
+ public string Name { get; set; }
+
+ [Required]
+ public string Email { get; set; }
+
+ [Required]
+ [Display(Name = "Enter a comment")]
+ public string Comment { get; set; }
+ }
+
+This class defines the data that will be submitted and also defines how the data will be validated upon submission and conveniently for us MVC automatically wires up these validation attributes with the front-end so JavaScript validation will automagically occur.
+
+##Creating the SurfaceController Action
+
+Next up, we need to create an Action on a SurfaceController which accepts our submitted View Model. Here's an example (this is a locally declared controller):
+
+ public class BlogPostSurfaceController : Umbraco.Web.Mvc.SurfaceController
+ {
+ [HttpPost]
+ public ActionResult CreateComment(CommentViewModel model)
+ {
+ //model not valid, do not save, but return current umbraco page
+ if (!ModelState.IsValid)
+ {
+ //Perhaps you might want to add a custom message to the TempData or ViewBag
+ //which will be available on the View when it renders (since we're not
+ //redirecting)
+ return CurrentUmbracoPage();
+ }
+
+ //if validation passes perform whatever logic
+ //In this sample we keep it empty, but try setting a breakpoint to see what is posted here
+
+ //Perhaps you might want to store some data in TempData which will be available
+ //in the View after the redirect below. An example might be to show a custom 'submit
+ //successful' message on the View, for example:
+ TempData.Add("CustomMessage", "Your form was successfully submitted at " + DateTime.Now)
+
+ //redirect to current page to clear the form
+ return RedirectToCurrentUmbracoPage();
+
+ //Or redirect to specific page
+ //return RedirectToUmbracoPage(12345)
+ }
+ }
+
+##Using BeginUmbracoForm
+
+Lastly we need to render the HTML form to ensure that it posts to the surface controller created. The easiest way to do this is to create a seperate PartialView to render your form with the model type declared as your ViewModel. There's a few overloads for the BeginUmbracoForm method, we'll start with the simplest one:
+
+ @model CommentViewModel
+
+ @using(Html.BeginUmbracoForm("CreateComment", "BlogPostSurface"))
+ {
+ @Html.EditorFor(x => Model)
+
+ }
+
+The above code snippet is a PartialView to render the form. Because the Model for the view is the ViewModel we want to scaffold the form, we can just do an `@Html.EditorFor(x => Model)` to automatically create all of the input fields.
+
+###Overloads
+
+This lists the different overloads available for BeginUmbracoForm:
+
+ //as seen in the above example
+ BeginUmbracoForm(this HtmlHelper html, string action, string controllerName)
+
+ //The next three are the same as above but allow you to specify additional route values and/or html attributes for the form tag
+ BeginUmbracoForm(this HtmlHelper html, string action, string controllerName, object additionalRouteVals)
+ BeginUmbracoForm(this HtmlHelper html, string action, string controllerName, object additionalRouteVals, object htmlAttributes)
+ BeginUmbracoForm(this HtmlHelper html, string action, string controllerName, object additionalRouteVals, IDictionary htmlAttributes)
+
+ //Allows you to specify the action name and controller type either by a generic type or type object:
+ BeginUmbracoForm(this HtmlHelper html, string action, Type surfaceType)
+ BeginUmbracoForm(this HtmlHelper html, string action)
+ BeginUmbracoForm(this HtmlHelper html, string action, Type surfaceType, object additionalRouteVals)
+ BeginUmbracoForm(this HtmlHelper html, string action, object additionalRouteVals)
+ BeginUmbracoForm(this HtmlHelper html, string action, Type surfaceType, object additionalRouteVals, object htmlAttributes)
+ BeginUmbracoForm(this HtmlHelper html, string action, object additionalRouteVals, object htmlAttributes)
+ BeginUmbracoForm(this HtmlHelper html, string action, Type surfaceType, object additionalRouteVals, IDictionary htmlAttributes)
+ BeginUmbracoForm(this HtmlHelper html, string action, object additionalRouteVals, IDictionary htmlAttributes)
+
+ //The following are only used for plugin based surface controllers. If you don't want to specify
+ //the controller type, you can specify the area that the plugin SurfaceController is routed to
+ BeginUmbracoForm(this HtmlHelper html, string action, string controllerName, string area)
+ BeginUmbracoForm(this HtmlHelper html, string action, string controllerName, string area, object additionalRouteVals, IDictionary htmlAttributes)
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/index.md b/OurUmbraco.Site/Documentation/Reference/Mvc/index.md
new file mode 100644
index 00000000..d5608ea6
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/index.md
@@ -0,0 +1,32 @@
+#Working with MVC in Umbraco
+
+**Applies to: Umbraco 4.10.0+**
+
+_This section will define the syntax for rendering content in your views_
+
+##[Views](views.md)
+Documentation covering the syntax to use in your Views to render and query content
+
+##[Partial Views](partial-views.md)
+Documentation covering how to use Partial Views. This is not documentation about using "Partial View Macros", this documentation relates simply to using native MVC partial views within Umbraco.
+
+##[Surface Controllers](surface-controllers.md)
+What is a Surface Controller and how to use them
+
+##[Child Actions](child-actions.md)
+Using MVC Child Actions in Umbraco
+
+##[Forms](forms.md)
+How to create html forms to submit data
+
+##[Querying](querying.md)
+How to query for data in your Views
+
+##[Custom controllers (hijacking routes)](custom-controllers.md)
+Creating custom controllers to have 100% full control over how your pages are rendered. AKA: Hijacking Umbraco Routes
+
+##[Custom routes](custom-routes.md)
+How to specify your own custom MVC routes in your application to work outside of the Umbraco pipeline
+
+##[Using IoC](using-ioc.md)
+How to setup IoC/Dependency Injection containers for use in MVC within Umbraco
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/partial-views.md b/OurUmbraco.Site/Documentation/Reference/Mvc/partial-views.md
new file mode 100644
index 00000000..60b3332c
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/partial-views.md
@@ -0,0 +1,100 @@
+#Using MVC Partial Views in Umbraco
+
+**Applies to: Umbraco 4.10.0+**
+
+_This section will show you how to use MVC Partial Views in Umbraco. Please note, this is documentation relating to the use of native MVC partial views, not the soon to come 'Partial View Macros'_
+
+##Overview
+
+Using Partial Views in Umbraco is exactly the same as using Partial Views in a normal MVC project. There is detailed documentation on the Internet about creating and using MVC partial views, for example:
+
+* [http://www.asp.net/mvc/videos/mvc-2/how-do-i/how-do-i-work-with-data-in-aspnet-mvc-partial-views](http://www.asp.net/mvc/videos/mvc-2/how-do-i/how-do-i-work-with-data-in-aspnet-mvc-partial-views)
+
+##View Locations
+
+The locations to store Partial Views when rendering in the Umbraco pipeline is:
+
+ ~/Views/Partials
+
+The standard MVC partial view locations will also work:
+
+ ~/Views/Shared
+ ~/Views/RenderMvc
+
+The ~/Views/RenderMvc location is valid because the controller that performs the rendering in the Umbraco codebase is the: `Umbraco.Web.Mvc.RenderMvcController`
+
+If however you are 'Hijacking an Umbraco route' and specifying your own controller to do the execution, then your partial view location can also be:
+
+ ~/Views/{YourControllerName}
+
+##Example
+
+A quick example of a content item that has a template that renders out a partial view template for each of it's child documents:
+
+The MVC template markup for the document:
+
+ @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
+ @{
+ Layout = null;
+ }
+
+
+
+
+ @foreach(var page in Model.Content.Children.Where(x => x.IsVisible())){
+
+ @Html.Partial("ChildItem", page)
+
+ }
+
+
+
+
+The partial view (located at: `~/Views/Partials/ChildItem.cshtml`)
+
+ @model IPublishedContent
+
+ @Model.Name
+
+#Strongly typed Partial Views
+
+Normally you would create a partial view by simply using the `@model MyModel` syntax. However, inside of Umbraco you will probably want to have access to the handy properties available on your normal Umbraco views like the Umbraco helper: `@Umbraco` and the Umbraco context: `@UmbracoContext`. The good news is that this is completely possible, instead of using the `@model MyModel` syntax, you just need to inherit from the correct view class so do this instead:
+
+ @inherits Umbraco.Web.Mvc.UmbracoViewPage
+
+By inheriting from this view, you'll have instant access to those handy properties and have your view created with a strongly typed custom model.
+
+Another case you might have is that you want your Partial View to be strongly typed with the same model type (`RenderModel`) as a normal template if you are passing around instances of IPublishedContent. To do this, just have your partial view inherit from `Umbraco.Web.Mvc.UmbracoTemplatePage` (just like your normal templates) and when you render your partial a neat trick is that you can just pass it an instance of `IPublishedContent` instead of a new instance of `RenderModel`. For Example:
+
+ @foreach(var child in Model.Content.Children())
+ {
+ @Html.Partial("MyPartialName", child)
+ }
+
+The partial view can still inherit from `Umbraco.Web.Mvc.UmbracoTemplatePage` which has a model of `RenderModel` but you can still just pass it an instance of `IPublishedContent` and a new `RenderModel` will be created and applied automagically for you. Of course you can always create your own `RenderModel` too like:
+
+ @foreach(var child in Model.Content.Children())
+ {
+ @Html.Partial("MyPartialName",
+ new global::Umbraco.Web.Models.RenderModel(child, Model.CurrentCulture))
+ }
+
+Both of these will acheive the same result.
+
+##Caching
+
+Normally you don't really need to cache the output of Partial views just like normally you don't need to cache the output of User Controls, however there are times when this is necessary. Just like macro caching we provide caching output of partial views. This is done simply by using an HtmlHelper extension method:
+
+ @Html.CachedPartial("MyPartialName", new MyModel(), 3600)
+
+the above will cache the output of your partial view for 1 hr (3600 seconds). Additionally there are a few optional parameters you can specify to this method. Here is the full method signature:
+
+ IHtmlString CachedPartial(
+ string partialViewName,
+ object model,
+ int cachedSeconds,
+ bool cacheByPage = false,
+ bool cacheByMember = false,
+ ViewDataDictionary viewData = null)
+
+So you can specify to cache by member and/or by page and also specify additional view data to your partial view. **HOWEVER**, if your view data is dynamic (meaning it could change per page request) the cached output will still be returned, this same principle goes for if the model you are passing in is dynamic. Please be aware of this as if you have a different model or viewData for any page request, the result will be the cached result of the first execution.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/querying.md b/OurUmbraco.Site/Documentation/Reference/Mvc/querying.md
new file mode 100644
index 00000000..09e23660
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/querying.md
@@ -0,0 +1,131 @@
+#Querying & Traversal
+
+**Applies to: Umbraco 4.10.0+**
+
+_This section will describe how you can render content from other nodes besides the current page in your MVC Views_
+
+##Querying for content and media by id
+
+The easiest way to get some content by Id is to use the following syntax (where 1234 is the content id you'd like to query for):
+
+ //to return the strongly typed (Umbraco.Core.Models.IPublishedContent) object
+ @Umbraco.TypedContent(1234)
+
+ //to return the dynamic representation:
+ @Umbraco.Content(1234)
+
+You can also query for multiple content items using multiple ids:
+
+ //to return the strongly typed (IEnumerable) collection
+ @Umbraco.TypedContent(1234, 4321, 1111, 2222)
+
+ //to return the dynamic representation:
+ @Umbraco.Content(1234, 4321, 1111, 2222)
+
+This syntax will support an unlimited number of Ids passed to the method.
+
+The same query structures apply to media:
+
+ @Umbraco.TypedMedia(9999)
+ @Umbraco.TypedMedia(9999,8888,7777)
+ @Umbraco.Media(9999)
+ @Umbraco.Media(9999,8888,7777)
+
+
+##Traversing
+
+All of these extension methods are available on `Umbraco.Core.Models.IPublishedContent` so you can have strongly typed access to all of them with intellisense for both content and media. Additionally, all of these methods are available for the dynamic model representation too. The following methods return `IEnumerable` (or dynamic if you are using @CurrentPage)
+
+ Children() //this is the same as using the Children property on the content item.
+ Ancestors()
+ Ancestors(int level)
+ Ancestors(string nodeTypeAlias)
+ AncestorsOrSelf()
+ AncestorsOrSelf(int level)
+ AncestorsOrSelf(string nodeTypeAlias)
+ Descendants()
+ Descendants(int level)
+ Descendants(string nodeTypeAlias)
+ DescendantsOrSelf()
+ DescendantsOrSelf(int level)
+ DescendantsOrSelf(string nodeTypeAlias)
+
+
+Additionally there are other methods that will return a single `IPublishedContentItem` (or dynamic if you are using @CurrentPage)
+
+ AncestorOrSelf()
+ AncestorOrSelf(int level)
+ AncestorOrSelf(string nodeTypeAlias)
+ AncestorOrSelf(Func func)
+ Up()
+ Up(int number)
+ Up(string nodeTypeAlias)
+ Down()
+ Down(int number)
+ Down(string nodeTypeAlias)
+ Next()
+ Next(int number)
+ Next(string nodeTypeAlias)
+ Previous()
+ Previous(int number)
+ Previous(string nodeTypeAlias)
+ Sibling(int number)
+ Sibling(string nodeTypeAlias)
+
+##Complex querying (Where)
+
+With the `IPublishedContent` model we support strongly typed Linq queries out of the box so you will have intellisense for that too. We also still support all of the dynamic query access that was supported for razor macros, however in some very minor cases the same syntax may not be supported. In some cases the dynamic queries may be less to type and in some cases the strongly typed way might be less to type so it will ultimately be your preference for what you use and you can most definitely inter-mingle the two.
+
+###Some examples
+
+####Where children are visible
+
+ //dynamic access
+ @CurrentPage.Children.Where("Visible")
+
+ //strongly typed access
+ @Model.Content.Children.Where(x => x.IsVisible())
+
+####Traverse for sitemap
+
+ //dynamic access
+ var values = new Dictionary();
+ values.Add("maxLevelForSitemap", 4);
+ var items = @CurrentPage.Children.Where("Visible && Level <= maxLevelForSitemap", values);
+
+ //strongly typed access
+ var items = @Model.Content.Children.Where(x => x.IsVisible() && x.Level <= 4)
+
+####Content sub menu
+
+ //dynamic access
+ //NOTE: you can also use NodeTypeAlias but is recommended to use DocumentTypeAlias
+ @CurrentPage.AncestorOrSelf(1).Children.Where("DocumentTypeAlias == \"DatatypesFolder\"").First().Children
+
+ //strongly typed
+ @Model.Content.AncestorOrSelf(1).Children.Where(x => x.DocumentTypeAlias == "DatatypesFolder").First().Children
+
+####Complex query
+
+Some complex queries cannot be written dynamically because the dynamic query parser may not understand precisely what you are coding. There are many edge cases where this occurs and for each one the parser will need to be updated to understand such an edge case. This is one reason why strongly typed querying is much better.
+
+ //This example gets the top level ancestor for the current node, and then gets
+ //the first node found that contains "1173" in the array of comma delimited
+ //values found in a property called 'selectedNodes'.
+ //NOTE: This is one of the edge cases where this doesn't work with dynamic execution but the
+ //syntax has been listed here to show you that its much easier to use the strongly typed query
+ //instead
+
+ //dynamic access
+ var paramVals = new Dictionary {{"splitTerm", new char[] {','}}, {"searchId", "1173"}};
+ var result = @CurrentPage.Ancestors().OrderBy("level")
+ .Single()
+ .Descendants()
+ .Where("selectedNodes != null && selectedNodes != String.Empty && selectedNodes.Split(splitTerm).Contains(searchId)", paramVals)
+ .FirstOrDefault();
+
+ //strongly typed
+ var result = @Model.Content.Ancestors().OrderBy(x => x.Level)
+ .Single()
+ .Descendants()
+ .FirstOrDefault(x => x.GetPropertyValue("selectedNodes", "").Split(',').Contains("1173"));
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/surface-controllers.md b/OurUmbraco.Site/Documentation/Reference/Mvc/surface-controllers.md
new file mode 100644
index 00000000..94baa8f8
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/surface-controllers.md
@@ -0,0 +1,81 @@
+#Surface Controllers
+
+**Applies to: Umbraco 4.10.0+**
+
+_A SurfaceController is an MVC controller that interacts with the front-end rendering of an UmbracoPage. They can be used for rendering Child Action content, for handling form data submissions and for rendering Child Action macros. SurfaceController's are auto-routed meaning that you don't have add/create your own routes for these controllers to work._
+
+##What is a SurfaceController?
+
+It is a regular ASP.Net MVC controller that:
+
+* Is auto routed, meaning you don't have to setup any custom routes to make it work
+* Is used for interacting with the front-end of Umbraco (not the back office)
+
+Since any SurfaceController inherits from the `Umbraco.Web.Mvc.SurfaceController` class, the class instantly supports many of the helper methods and properties that are available on the base SurfaceController class including `UmbracoHelper` and `UmbracoContext`. Therefore, all Surface Controlers have native Umbraco support for:
+
+* interacting with Umbraco routes during HTTP Posts (i.e. `return CurrentUmbracoPage();` )
+* rendering forms in Umbraco (i.e. `@Html.BeginUmbracoForm(...)` )
+* rendering ASP.Net MVC ChildAction (see [ChildActions](child-actions.md) documentation)
+* rendering ChildAction macros (when they are supported in 4.11)
+
+##Creating a SurfaceController
+
+SurfaceController's are plugins, meaning they are found when the Umbraco application boots. There are 2 types of SurfaceController's: **locally declared** & **plugin based**. The main difference between the 2 is that a plugin based controller gets routed via an MVC Area (which is defined on the controller... see below). Because a plugin based controller is routed via an MVC Area, it means that the views can be stored in a custom folder specific to the package it is being shipped in without interfering with the local developers MVC files.
+
+###Locally declared controllers
+
+A locally declared SurfaceController is one that is not shipped within an Umbraco package. It is created by the developer of the website they are creating. If you are planning on shipping a SurfaceController in an Umbraco package then you will need to create a plugin based SurfaceController (see the next heading).
+
+To create a locally declared SurfaceController:
+
+* Create a controller that inherits from `Umbraco.Web.Mvc.SurfaceController`
+* The controller must be a 'public' class.
+* The controller's name must be suffixed with the term 'SurfaceController'
+
+For example:
+
+ public void MySurfaceController : Umbraco.Web.Mvc.SurfaceController
+ {
+ public ActionResult Index()
+ {
+ return Content("hello world");
+ }
+ }
+
+####Routing for locally declared controllers
+
+All locally declared controllers get routed to:
+
+/umbraco/surface/{controllername}/{action}/{id}
+
+They do not get routed via an MVC Area so any Views must exist in the following folders:
+
+* ~/Views/{controllername}/
+* ~/Views/Shared/
+* ~/Views/
+
+##Plugin based controllers
+
+If you are shipping a SurfaceController in a package then you should definitely be creating a plugin based SurfaceController. The only difference between creating a plugin based controller and locally declared controller is that you just need to add an attribute to your class which defines the MVC Area you'd like your controller routed through. Here's an example:
+
+ [SurfaceController("SuperAwesomeAnalytics")]
+ public void MySurfaceController : Umbraco.Web.Mvc.SurfaceController
+ {
+ public ActionResult Index()
+ {
+ return Content("hello world");
+ }
+ }
+
+In the above, I've specified that I'd like my MySurfaceController to belong to the MVC Area called 'SuperAwesomeAnalytics'. Perhaps it is obvious but if you are creating a package that contains many SurfaceController's then you should most definitely ensure that all of your controllers are routed through the same MVC Area.
+
+####Routing for plugin based controllers
+
+All plugin based controllers get routed to:
+
+/umbraco/{areaname}/{controllername}/{action}/{id}
+
+Since they get routed via an MVC Area your views should be placed in the following folder:
+
+* ~/App_Plugins/{areaname}/Views/{controllername}/
+* ~/App_Plugins/{areaname}/Views/Shared/
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/using-ioc.md b/OurUmbraco.Site/Documentation/Reference/Mvc/using-ioc.md
new file mode 100644
index 00000000..b859c203
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/using-ioc.md
@@ -0,0 +1,95 @@
+#Using IoC with MVC in Umbraco
+
+**Applies to: Umbraco 4.10.0+**
+
+_This section will show you how to setup Ioc/Dependency Injection with your Umbraco installation for MVC. The examples will use Autofac but you can use whatever you want_
+
+##Overview
+
+We don't use IoC in the Umbraco source code whatsoever. This isn't because we don't like it or don't want to use it, it's because we want you as a developer to be able to use whatever IoC framework that you would like to use without jumping through any hoops. With that said, it means it is possible to implement whatever IoC engine that you'd like!
+
+##Implementation
+
+In most IoC frameworks you would setup your container in your global.asax class. To do that in Umbraco, you will need to inherit from our global.asax class called: `Umbraco.Web.UmbracoApplication`. You should then override the `OnApplicationStarted` method to build your container and initialize any of the IoC stuff that you require.
+
+##Example
+
+This example will setup Autofac to work with Umbraco (see [their documentation](http://code.google.com/p/autofac/wiki/Mvc3Integration) for full details)
+
+For this example we're going to add a custom class to the IoC container as a Transient instance, here's the class:
+
+ public class MyAwesomeContext
+ {
+ public MyAwesomeContext()
+ {
+ MyId = Guid.NewGuid();
+ }
+ public Guid MyId { get; private set; }
+ }
+
+Here's an example of a custom global.asax class which initializes the IoC container:
+
+ ///
+ /// The global.asax class
+ ///
+ public class MyApplication : Umbraco.Web.UmbracoApplication
+ {
+ protected override void OnApplicationStarted(object sender, EventArgs e)
+ {
+ base.OnApplicationStarted(sender, e);
+
+ var builder = new ContainerBuilder();
+
+ //register all controllers found in this assembly
+ builder.RegisterControllers(typeof(MyApplication).Assembly);
+
+ //add custom class to the container as Transient instance
+ builder.RegisterType();
+
+ var container = builder.Build();
+ DependencyResolver.SetResolver(new AutofacDependencyResolver(container));
+ }
+ }
+
+In this example we will assume that we have a Document Type called 'Home' Now we're going to create a custom controller to hijack a route for all content pages of type Home *(NOTE: we can target custom template names too, see the [Hijacking routes](custom-controllers.md) documentation for full details).* Notice that the constructor accepts a parameter the custom class, this will be injected via IoC.
+
+ public class HomeController : RenderMvcController
+ {
+ private readonly MyAwesomeContext _myAwesome;
+
+ public HomeController(MyAwesomeContext myAwesome)
+ {
+ _myAwesome = myAwesome;
+ }
+
+ public override ActionResult Index(Umbraco.Web.Models.RenderModel model)
+ {
+ //get the current template name
+ var template = this.ControllerContext.RouteData.Values["action"].ToString();
+ //return the view with the model as the id of the custom class
+ return View(template, _myAwesome.MyId);
+ }
+ }
+
+As another example, you can do the same with SurfaceControllers. Here we are creating a locally declared SurfaceController that has a Child Action and again just like the previous controller it will have a new instance of the custom class injected:
+
+ public class MyTestSurfaceController : SurfaceController
+ {
+ private readonly MyAwesomeContext _myAwesome;
+
+ public MyTestSurfaceController(MyAwesomeContext myAwesome)
+ {
+ _myAwesome = myAwesome;
+ }
+
+ [ChildActionOnly]
+ public ActionResult HelloWorld()
+ {
+ return Content("Hello World! Here is my id " + _myAwesome.MyId);
+ }
+ }
+
+
+##Things to note
+
+We use a custom MVC controller builder in our code called `Umbraco.Web.Mvc.MasterControllerFactory`, which needs to always be the default controller factory, if you change this Umbraco will probably not work anymore. The good news is that you can specify 'slave' factories so you can specify custom controller factories for different purposes. You would just need to create a new class that inherits from `Umbraco.Web.Mvc.IFilteredControllerFactory` and ensure that the class is public (so it can be found). If your IoC implementation affects the default controller factory, you may have to modify it in order to support this implementation. For the most part, most IoC frameworks will just target setting a custom DependencyResolver which is 100% ok.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Mvc/views.md b/OurUmbraco.Site/Documentation/Reference/Mvc/views.md
new file mode 100644
index 00000000..a98fd7aa
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Mvc/views.md
@@ -0,0 +1,71 @@
+#Working with MVC Views in Umbraco
+
+**Applies to: Umbraco 4.10.0+**
+
+_This section will focus on how to use the MVC rendering engine in Umbraco such as the syntax to use in your Views, creating forms and creating your own custom controllers_
+
+##Properties available in Views
+
+All Umbraco views inherit from `Umbraco.Web.Mvc.UmbracoTemplatePage` which exposes many properties that are available in razor:
+
+* @Umbraco (of type `Umbraco.Web.UmbracoHelper`) -> contains many helpful methods, from rendering macros and fields to retreiving content based on an Id and tons of other helpful methods. This is essentially the replacement for the 'library' object in the old codebase.
+* @Html (of type `HtmlHelper`) -> the same HtmlHelper you know and love from Microsoft but we've added a bunch of handy extension methods like @Html.BeginUmbracoForm
+* @CurrentPage (of type `DynamicPublishedContent`) -> the dynamic representation of the current page model which allows dynamic access to fields and also dynamic Linq
+* @Model (of type `Umbraco.Web.Mvc.RenderModel`) -> the model for the view which contains a property called Content which gives you accesss to the typed current page (of type IPublishedContent).
+* @UmbracoContext (of type `Umbraco.Web.UmbracoContext1)
+* @ApplicationContext (of type `Umbraco.Core.ApplicationContext`)
+
+##Rendering a field with UmbracoHelper
+This is probably the most used method which simply renders the contents of a field for the current content item.
+
+ @Umbraco.Field("bodyContent")
+
+There are several optional parameters. Here is the list with their default values:
+
+* altFieldAlias = ""
+* altText = ""
+* insertBefore = ""
+* insertAfter = ""
+* recursive = false
+* convertLineBreaks = false
+* removeParagraphTags = false
+* casing = RenderFieldCaseType.Unchanged
+* encoding = RenderFieldEncodingType.Unchanged
+
+The easiest way to use the Field method is to simply specify the optional parameters you'd like to set. For example, if we want to set the insertBefore and insertAfter parameters we'd do:
+
+ @Umbraco.Field("bodyContent", insertBefore = "
", insertAfter = "
")
+
+
+##Rendering a field with Model
+
+The UmbracoHelper method provides many useful parameters to change how the value is rendered. If you however simply want to render value "as-is" you can use the @Model.Content property of the view. For example:
+
+ @Model.Content.Properties["bodyContent"].Value
+
+Or alternatively:
+
+ @Model.Content.GetProperty("bodyContent")
+
+##Rendering a field using @CurrentPage (dynamically)
+
+The UmbracoHelper method provides many useful parameters to change how the value is rendered. If you however simply want to render value "as-is" you can use the @CurrentPage property of the view. The difference between @CurrentPage and @Model.Content is that @CurrentPage is the dynamic representation of the model which exposes many dynamic features for querying. For example, to render a field you simply use this syntax:
+
+ @CurrentPage.bodyContent
+
+##Rendering Macros
+
+Rendering a macro is easy using UmbracoHelper. There are 3 overloads, we'll start with the most basic:
+
+This renders a macro with the specified alias without any parameters:
+
+ @Umbraco.RenderMacro("myMacroAlias")
+
+This renders a macro with some parameters using an anonymous object:
+
+ @Umbraco.RenderMacro("myMacroAlias", new { name = "Ned", age = 28 })
+
+This renders a macro with some parameters using a dictionary
+
+ @Umbraco.RenderMacro("myMacroAlias", new Dictionary {{ "name", "Ned"}, { "age", 27}})
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Plugins/creating-resolvers.md b/OurUmbraco.Site/Documentation/Reference/Plugins/creating-resolvers.md
new file mode 100644
index 00000000..0feeb5e7
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Plugins/creating-resolvers.md
@@ -0,0 +1,88 @@
+#Creating Resolvers
+
+**Applies to: Umbraco 4.10.0+**
+
+_A Resolver should be created for any plugin type. Resolvers are the standard way to retreive/create/register plugin types._
+
+##Creating a single object resolver
+
+As an example, we'll create a resolver to resolve an application error logger:
+
+ ///
+ /// An object resolver to return the IErrorLogger
+ ///
+ public class ErrorLoggerResolver : SingleObjectResolverBase
+ {
+ internal ContentStoreResolver(IErrorLogger errorLogger)
+ : base(errorLogger)
+ {
+ }
+
+ ///
+ /// Can be used by developers at runtime to set their IErrorLogger at app startup
+ ///
+ ///
+ public void SetErrorLogger(IErrorLogger errorLogger)
+ {
+ Value = contentStore;
+ }
+
+ ///
+ /// Returns the IErrorLogger
+ ///
+ public IErrorLogger ErrorLogger
+ {
+ get { return Value; }
+ }
+ }
+
+All you need to do is inherit from `Umbraco.Core.ObjectResolution.SingleObjectResolverBase` and then add whatever constructors, properties and methods you would like to expose.
+
+In the example above we have a constructor that accepts a default `IErrorLogger`. Normally in Umbraco this resolver will be constructored in a `IBootManager` with a default object. The we expose a method to allow developers to change to a custom `IErrorLogger` at runtime called `SetErrorLogger`. Then we create a property to expose the `IErrorLogger` called ErrorLogger.
+
+Its usage is then very easy:
+
+ //get the error logger
+ IErrorLogger logger = ErrorLoggerResolver.Current.ErrorLogger;
+
+ //set the error logger (can only be done during application startup)
+ ErrorLoggerResolver.Current.SetErrorLogger(new MyCustomErrorLogger("../my-file-path"));
+
+##Creating a multiple object resolver
+
+Creating a multiple object resolver is just as simple. As an example we'll create a LanguageConvertersResolver.
+
+(NOTE: the naming convention for multiple objects resolvers are plural: We've named this LanguageConverter**s**Resolver with a pluralized 'Converters' to denote that this resolver returns multiple objects)
+
+ public sealed class LanguageConvertersResolver : ManyObjectsResolverBase
+ {
+ ///
+ /// Constructor
+ ///
+ ///
+ internal LanguageConvertersResolver(IEnumerable converters)
+ : base(providers)
+ {
+ }
+
+ ///
+ /// Return the converters
+ ///
+ public IEnumerable Converters
+ {
+ get { return Values; }
+ }
+
+ }
+
+When creating a multiple object resolver you need to decide what lifetime scope the objects created and returned will have which is defined in the constructor created. The default constructor of the `ManyObjectsResolverBase` specifies that the objects created will have an Application based lifetime scope which means the objects will be singletons only one instance of each one will exist for the lifetime of the application. There are 3 lifetime scopes that can be specified:
+
+* ObjectLifetimeScope.Application
+ * One instance of each object will be created for the entire lifetime of the application (singleton)
+* ObjectLifetimeScope.Transient
+ * A new instance of each object will be created each time the 'Values' collection is accessed
+* ObjectLifetimeScope.HttpRequest
+ * One instance of each object will be created for the lifetime of the current http request
+
+
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Plugins/finding-types.md b/OurUmbraco.Site/Documentation/Reference/Plugins/finding-types.md
new file mode 100644
index 00000000..ebd47e2c
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Plugins/finding-types.md
@@ -0,0 +1,36 @@
+#Finding types
+
+**Applies to: Umbraco 4.10.0+**
+
+_Whenever types need to be found in assemblies in order to add them to resolvers, the PluginManager should be used. The TypeFinder should never be used directly in any code except for in PluginManager extension methods or in the PluingManager itself._
+
+##The Plugin Manager
+
+The `Umbraco.Core.PluginManager` class is responsible for finding and caching all plugin types. It is also responsible for instantiating these types. It contains 4 important methods:
+
+* IEnumerable ResolveTypes()
+ * Generic method to find the specified type and cache the result
+* IEnumerable ResolveTypesWithAttribute()
+ * Generic method to find the specified type that has an attribute and cache the result
+* IEnumerable ResolveAttributedTypes()
+ * Generic method to find any type that has the specified attribute and cache the result
+* T CreateInstance(Type type, bool throwException = false)
+ * Used to create an instance of the specified type based on the resolved/cached plugin types
+
+##Finding types
+
+It is definitely possible to simply use the methods above to find types in your code but this is not recommended practice. It is recommended to create extension methods for the PluginManager named accordingly to find specific types. For example:
+
+ PluginManager.Current.ResolveTrees();
+
+The code for this method is as follows:
+
+ internal static IEnumerable ResolveTrees(this PluginManager resolver)
+ {
+ return resolver.ResolveTypes();
+ }
+
+The code simply calls the PluginManager's ResolveTypes method but this method is human readable and easy to distinguish.
+
+
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Plugins/index.md b/OurUmbraco.Site/Documentation/Reference/Plugins/index.md
new file mode 100644
index 00000000..08177e75
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Plugins/index.md
@@ -0,0 +1,17 @@
+#Plugins
+
+**Applies to: Umbraco 4.10.0+**
+
+_The term 'Plugins' is refering to any types in Umbraco that are found in assemblies that are used to extend and/or enhance the Umbraco application. Plugins can also be added directly registered to their specific 'Resolver' if the plugin type is not public or if the Resolver type doesn't support finding types in assemblies._
+
+##[What is a Resolver](resolvers.md)
+What is a Resolver and what kinds of Resolvers are there?
+
+##[Creating a Resolver for a Plugin](creating-resolvers.md)
+Creating a single object and multiple object Resolver
+
+##[Finding types](finding-types.md)
+Using the PluginManager to lookup types in assemblies to register in Resolvers
+
+##[Initializing a Resolver](initializing-resolvers.md)
+All Resolvers need to be initialized, this shows you where this needs to occur, how it is done and how to combine type finding with resolvers.
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Plugins/initializing-resolvers.md b/OurUmbraco.Site/Documentation/Reference/Plugins/initializing-resolvers.md
new file mode 100644
index 00000000..cbad40a5
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Plugins/initializing-resolvers.md
@@ -0,0 +1,32 @@
+#Initializing Resolvers
+
+**Applies to: Umbraco 4.10.0+**
+
+_All resolvers need to be initialized, this occurs in an IBootManager_
+
+##Initializing the singleton
+
+An `IBootManager` is a bootstrapper that initializing all required objects during application startup, this includes initializing all resolvers.
+
+This is a ver easy process, for example to initialize the custom resolvers we've made in the previous steps we would just do the following:
+
+ //initialize the singleton with a DefaultErrorLogger
+ ErrorLoggerResolver.Current = new ErrorLoggerResolver(new DefaultErrorLogger());
+
+ //initialize the language converters singleton with
+ //our default language converter types
+ LanguageConvertersResolver.Current = new LanguageConvertersResolver(
+ new Type[] {
+ typeof(EnglishLanguageConverter),
+ typeof(SpanishLanguageConverter)
+ });
+
+##Initialization with type finding
+
+Instead of initializing multiple object resolvers with an array of known types, we can initialize them with types found in the current application pool if this is the desired behavior. This is quite easy to do once we've created an extension method for the PluginManager to find the specified type. This example initializes the ActionsResolver:
+
+ ActionsResolver.Current = new ActionsResolver(
+ PluginManager.Current.ResolveActions());
+
+
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Plugins/resolvers.md b/OurUmbraco.Site/Documentation/Reference/Plugins/resolvers.md
new file mode 100644
index 00000000..76c1886f
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Plugins/resolvers.md
@@ -0,0 +1,41 @@
+#Resolvers
+
+**Applies to: Umbraco 4.10.0+**
+
+_A Resolver is an class that returns a plugin object or multiple plugin objects. There are 2 types of Resolvers: A single object resolver and a multiple object resolver._
+
+##Single object resolver
+A resolver that returns a single object. The best way to explain this is by example:
+
+`IContentStore routesCache = ContentStoreResolver.Current.ContentStore;`
+
+In the example above we get the currently assigned IContentStore from the ContentStoreResolver. This is a single object registered resolver and therefore it only returns one object. Developers can register a custom object in single object resolvers so long as the resolver is created to allow this.
+
+As an example, to set a different IContentStore, we would execute this code:
+
+`ContentStoreResolver.Current.SetContentStore(new CustomContentStore("12355"));`
+
+**All single object resolvers return an object that will exist as a *singleton* and one instance will exist for the lifetime of the application.**
+
+##Multiple object resolver
+
+A resolver that returns multiple objects of one type. Again, an example works best to explain:
+
+`IEnumerable cacheRefreshers = CacheRefreshersResolver.Current.CacheResolvers;`
+
+In the example above we get all ICacheRefresher object that have been found and/or registered. As this is a multiple object resolver, it returns many objects not just one. Developers can modify the list of types in a multiple object resolver during application startup. For example to add a custom cache refresher of type 'CustomCacheRefresher' the following code can be executed:
+
+`CacheRefreshersResolver.Current.AddType();`
+
+Some multiple object resolvers need to maintain a specific order of objects such as the DocumentLookupsResolver. Developers have full control over the order of registered objects since the base class `Umbraco.Core.ObjectResolution.ManyObjectsResolverBase` supports multiple methods just like a list:
+
+* void RemoveType(Type value)
+* void RemoveType()
+* void AddType(Type value)
+* void AddType()
+* void Clear()
+* void InsertType(int index, Type value)
+* void InsertType(int index)
+
+**Multiple object resolvers can return instances based on different lifetime scopes. The lifetime scope of a resolver is determined by the developer of the resolver.**
+
diff --git a/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/Collections.md b/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/Collections.md
new file mode 100644
index 00000000..5d0d2144
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/Collections.md
@@ -0,0 +1,234 @@
+#DynamicNode
+
+##Collections
+All collections returned by Model are of type DynamicContentList, which itself has a collection of properties.
+
+###.[DocumentTypeAlias]s (Pluralised Collections)
+Returns the children of the current page, matching the Document type alias
+
+**Get all children of type with alias: 'textPage'**
+
+ @var collection = Model.TextPages
+
+**Get the first child page of type with alias: 'homePage'**
+
+ @var page = Model.HomePages.First()
+
+
+###.Children
+Returns a collection of items just below the current content item
+
+
+
+###.AncestorsOrSelf
+Returns a collection of all ancestors of the current page (parent page, grandparent and so on), and the current page itself
+
+ @* Get the top item in the content tree, this will always be the Last ancestor found *@
+ var websiteRoot = Model.AncestorsOrSelf.Last();
+
+
+###.Descendants
+Returns all descendants of the current page (children, grandchildren etc)
+
+
+ @* Filter collection by the document type alias *@
+ @foreach(var item in Model.Descendants.Where("NodeTypeAlias = @0", "newsItem")){
+
+
+
+###.XPath(string XPath)
+Returns a collection of items that match the XPath expression specified.
+
+ @* select all the newsitems that have more than 0 pictures attached *@
+ @foreach(var item in @Model.XPath("//NewsItem[count(.//Pictures) > 0]"))
+ {
+ @item.Name
+ }
+
+###.GetChildrenAsList
+Returns a `DynamicNodeList` of `DynamicNode` of the child content items
+
+-----
+
+##Traversing
+
+###.Parent
+Returns a dynamic object, referencing the parent of the current page. If current page is at the top of the site tree, null will be returned.
+
+###.First()
+Returns the first item in a specified collection.
+
+ @var NewsArea = Model.NewsAreas.First();
+
+
+###.Last()
+Returns the last item in a specified collection.
+
+ @var root =Model.AncestorsOrSelf.Last();
+
+###.Up([int])
+Returns a parent item up the tree by one level or by the value specified in the optional parameter. default value = 0, or 1 level. For example to move up two levels set the optional parameter to 1.
+
+ @var parent = Model.Up();
+ @var parentsParent = Model.Up(1);
+
+###.Down([int])
+Returns a child item down the tree by one level or by the value specified in the optional parameter. default value = 0, or 1 level. For example to move down two levels set the optional parameter to 1.
+
+ @var firstChild = Model.Down();
+ @var firstChildsFirstChild = Model.Down(1);
+
+###.Next([int])
+Returns the next sibling item in the tree by one position or by the value specified in the optional parameter. default value = 0, or 1 level. For example to move two positions set the optional parameter to 1.
+
+ @var nextSibling = Model.Next();
+ @var anotherSibling = Model.Next(1);
+
+###.Previous([int])
+Returns the previous sibling item in the tree by one position or by the value specified in the optional parameter. default value = 0, or 1 level. For example to move two positions set the optional parameter to 1.
+
+ @var previousSibling = Model.Previous();
+ @var anotherSibling = Model.Previous(1);
+
+###.AncestorOrSelf()
+The AncestorOrSelf() method has a number of overloads that allow you to quickly traverse the tree and return an item that matches the overloaded criteria.
+Using the menthod without any parameters will return the top most node in tree that you are currently navigating.
+
+**Notice** `.AncestorOrSelf()` should not be confused with the collection [`.AncestorsOrSelf()`](#ancestorsorself)
+
+ @var root = Model.AncestorOrSelf();
+
+
+
+
Overload Option
Description
+
+
+
.AncestorOrSelf()
+
Returns the root item from the current tree
+
+
+
.AncestorOrSelf((int)level)
+
Returns the item from the Ancestors collection at the specified level
+
+
+
.AncestorOrSelf((string)nodeTypeAlias)
+
Returns the item from the Ancestors collection with the specified nodeTypeAlias
+
+
+
+**Examples**
+
+ @* get the root item of the current tree *@
+ @var root = Model.AncestorOrSelf();
+
+ @* get the item at level 2 *@
+ @var level2Item = Model.AncestorOrSelf(2);
+
+ @* get item with nodeTypeAlias "HomePage" *@
+ @var home = Model.AncestorOrSelf("HomePage");
+
+-----
+
+##Filtering, Ordering & Extensions
+
+###.Where("condition"[, valueIfTrue, valueIfFalse] )
+Returns all items matching the given condition.
+For more details on queries and conditions, see the section below
+
+ @var ancestors = Model.Where("UmbracoNaviHide != @0", "True");
+
+ @var HomePage = Model.Where("NodeTypeAlias == @0 && Level == @1 || Name = @2", "HomePage", 0, "Home").First();
+
+###.OrderBy("fieldname [desc][,propertyAlias")
+Orders a collection by a field name
+
+ @* order by name *@
+ @var nodes = Model.Children.OrderBy("Name");
+
+ @* order by descending name *@
+ @var nodes = Model.Children.OrderBy("Name desc");
+
+###.GroupBy("propertyAlias")
+Groups items in the collection based on a content property that is used as a key and returns a Collection of Anonymous objects that have two properties. `.Key` and `.Elements` that contains a collection of the content items for that grouping.
+
+ @{
+ var groupedItems = Model.Children.GroupBy("MyProperty");
+ foreach (var group in groupedItems)
+ {
+
@group.Key
+ foreach(var item in group.Elements)
+ {
+
@el.Name
+ }
+ }
+ }
+
+
+###.InGroupsOf([int])
+Returns a collection as a collection of collections. The integer value specifies the size of the groups.
+
+ @* return in groups of 3 *@
+ @foreach(var group in Model.Children.InGroupsOf(3)){
+
+ @foreach(var item in group){
+
@item.Name
+ }
+
+ }
+
+###.Pluck("PropertyName")
+Returns a collection of type `new List()` of only the specified property and not the entire content item.
+
+ @* return only the colour property as a List(); *@
+ @Model.Children.Pluck("colour");
+
+
+###.Take(int)
+Return only the number of items for a collection specified by the integer value.
+
+ @* return the first 3 items from the child collection *@
+ @var nodes = Model.Children.Take(3);
+
+###.Skip(int)
+Return items from the collection after skipping the specified number of items.
+
+ @* Skip the first 3 items in the collection and return the rest *@
+ @var nodes = Model.Children.Skip(3);
+
+**HINT:** You can combine Skip and Take when using for paging operations
+
+ @* using skip and take together you can perform paging operations *@
+ @var nodes = Model.Skip(10).Take(10);
+
+###.Count()
+Returns the number of items in the collection
+
+ @int numberOfChildren = Model.Children.Count();
+
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/IsHelpers.md b/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/IsHelpers.md
new file mode 100644
index 00000000..31d2680c
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/IsHelpers.md
@@ -0,0 +1,75 @@
+#DynamicNode IsHelpers
+The IsHelper methods are a set of extension methods for DynamicNode to 'help' perform quick conditional queries against DynamicNode nodes in a collection.
+
+IsHelper methods all work the same, and have 3 overloads. They're basically ternary operators, but work a little nicer in that they're easy to embed in properties and quicker to write as you don't need so many brackets to make Razor understand them.
+
+The general use IsHelper is to allow you to dynamically inject class names and style attributes onto your html elements, based on their position within the collection you are iterating. You can use this for a variety of things such as alternating row colours or fixing the margin/padding on the first/last item etc.
+
+---
+
+##How to use
+To use an IsHelper you need to be iterating over a collection of DynamicNodes.
+
+
+ @foreach(var item in Model.Children){
+
@item.Name
+ }
+
+
+Is helpers work like ternary operators. The example above uses the `.IsFirst()` Ishelper method. The first parameter is the value we want it to return if the condition returns true, and the second, optional value, is the value we want to return if the condition evaluates to false.
+
+IsHelpers can also return simple boolean values.
+
+ @if(item.IsFirst()){
+
Extra info for this item
+ }
+
+---
+
+##IsHelper Methods
+
+###.IsFirst([string valueIfTrue][,string valueIfFalse])
+Test if current node is the first item in the collection
+
+###.IsNotFirst([string valueIfTrue][,string valueIfFalse])
+Test if current node is not first item in the collection
+
+###.IsLast([string valueIfTrue][,string valueIfFalse])
+Test if current node is the last item in the collection
+
+###.IsNotLast([string valueIfTrue][,string valueIfFalse])
+Test if current node is not the last item in the collection
+
+###.IsPosition(int index[,string valueIfTrue][,string valueIfFalse])
+Test if current node is at the specified index in the collection
+
+###.IsNotPosition(int index[,string valueIfTrue][,string valueIfFalse])
+Test if current node is not at the specified index in the collection
+
+###.IsModZero([string valueIfTrue][,string valueIfFalse])
+Test if current node position evenly dividable (modulus) by a given number
+
+###.IsNotModZero([string valueIfTrue][,string valueIfFalse])
+Test if current node position is not evenly dividable (modulus) by a given number
+
+
+###.IsEven([string valueIfTrue][,string valueIfFalse])
+Test if current node position is even
+
+###.IsOdd([string valueIfTrue][,string valueIfFalse])
+Test if current node position is odd
+
+###.IsEqual(DynamicNode otherNode[,string valueIfTrue][,string valueIfFalse])
+Tests if the current node in your iteration is equivalent (by Id) to another node
+
+###.IsDescendant(DynamicNode otherNode[,string valueIfTrue][,string valueIfFalse])
+Tests if the current node in your iteration is a descendant of another node
+
+###.IsDescendantOrSelf(DynamicNode otherNode[,string valueIfTrue][,string valueIfFalse])
+Tests if the current node in your iteration is a descendant of another node or is the node
+
+###.IsAncestor(DynamicNode otherNode[,string valueIfTrue][,string valueIfFalse])
+Tests if the current node in your iteration is an ancestor of another node
+
+###.IsAncestorOrSelf(DynamicNode otherNode[,string valueIfTrue][,string valueIfFalse])
+Tests if the current node in your iteration is an ancestor of another node or is the node
\ No newline at end of file
diff --git a/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/Library.md b/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/Library.md
new file mode 100644
index 00000000..46dee183
--- /dev/null
+++ b/OurUmbraco.Site/Documentation/Reference/Querying/DynamicNode/Library.md
@@ -0,0 +1,135 @@
+#DynamicNode
+
+##Library
+The @Library class is of type RazorLibraryCore in the namespace umbraco.MacroEngines.Library. It contains a collection of useful methods for use in Razor templates.
+
+###.Coalesce(params object[] args)
+Takes the first non-null, non-DynamicNull property value and return the value of it.
+
+ @Library.Coalesce(@Model.property1, @Model.property2, @Model.Name)
+
+###.Concatenate(params object[] args)
+
+Concatenate will just concatenate the parameters you pass in together as if you had gone @Model.property + @Model.property2 + @ Model.Name
+
+ @Library.Concatenate(@Model.property1, @Model.property2, @Model.Name)
+
+###.Join(string seperator, params object[] args)
+Join does the same as concatenate except it takes a seperator as the first parameter.
+
+ @Library.Join(",", @Model.property1, @Model.property2, @Model.Name)
+
+###.NodeById(int Id)
+Returns a single node as DynamicNode
+
+Overloads:
+
+ public dynamic NodeById(int Id)
+ public dynamic NodeById(string Id)
+ public dynamic NodeById(object Id)
+
+
+###.NodesById(List Ids)
+Returns multiple nodes as DynamicNodeList
+
+Overloads:
+
+ public dynamic NodesById(List Ids)
+ public dynamic NodesById(List\n";h.foot="\n