MaeSitus - Sitecore
Sunday, May 31, 2009
Getting Ancestor item based on Template ID
public static Item GetAncestorItemBasedOnTemplateID(Item item)
{
var filter = "";
filter += string.Format("contains('{0}', @@templateid)", item["templates"]);
return item.Axes.SelectSingleItem("ancestor-or-self::*[" + filter + "]");
}
Sunday, May 3, 2009
Getting user from SC6
if(User.Exists(domainUser))
{
var user = User.FromName(domainUser, false);
return !string.IsNullOrEmpty(user.Profile.FullName) ? user.Profile.FullName : user.LocalName;
}
Increasing the allowed Media file size
The following web.config changes, will enable bigger size Media item to be upload.
<httpRuntime maxRequestLength="20480" executionTimeout="600"/>
and
<setting name="Media.MaxSizeInDatabase" value="20MB"/>
Those changes will increase the allowed file size to 20MB
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)