Monday, November 19, 2012

Change textstring to multiple text string or richtexteditor

Just copy the data in dataNvarchar to dataNText (or vice-versa) in the table cmsPropertyData with the right  propertytypeid to have the content on the property in umbraco.

Force Republish umbraco

http://siteUrl/Umbraco/dialogs/republish.aspx?xml=true

Source:
http://our.umbraco.org/wiki/reference/api-cheatsheet/publishing-and-republishing

Thursday, November 1, 2012

Change Nodes Templates


select * from cmsDocument where nodeid in (select id from umbracoNode where parentId = 1207) and  newest = 1

update cmsDocument set templateid = 8663 where nodeid in (select id from umbracoNode where parentId = 1207 ) and  newest = 1

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/

Wednesday, February 1, 2012

Friday, January 6, 2012

Get Url Left Part

HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority);