Tuesday, October 23, 2012

Get all Document types and Fields


select
umbracoNode.id as Id,
Text as DocumentTypeName,
cmsContentType.Alias as DocumentTypeAlias,
Name as FieldName,
cmsPropertyType.Alias as FieldAlias
from cmsPropertyType
inner join umbracoNode on cmsPropertyType.contentTypeId = umbracoNode.id
inner join cmsContentType on cmsContentType.NodeId = umbracoNode.id
order by text

Object Node Type Id's

'C66BA18E-EAF3-4CFF-8A22-41B16D66A972' - Content
'A2CB7800-F571-4787-9638-BC48539A0EFB' - Document Types
'B796F64C-1F99-4FFB-B886-4BF4BC011A9C' - Media Cotent
'6FBDE604-4178-42CE-A10B-8A2600A2F07D' - Master Templates
'4EA4382B-2F5A-4C2B-9587-AE9B3CF3602E' - Media Types

Monday, October 22, 2012

Application_Start on umbraco


public class MyGlobal : umbraco.Global
{
    protected override void Application_Start(object sender, EventArgs e)
    {
        base.Application_Start(sender, e);

        // Insert your startup logic here
    }
}

in 

http://blog.mattbrailsford.com/2010/07/11/registering-an-application-start-event-handler-in-umbraco/