using System;
using CMS.DocumentEngine;
using CMS.UIControls;
using CMS.SettingsProvider;
///
/// Attachment WebDAV control.
///
public partial class CMSModules_WebDAV_Controls_AttachmentWebDAVEditControl : WebDAVEditControl
{
#region "Constructors"
///
/// Creates instance.
///
public CMSModules_WebDAV_Controls_AttachmentWebDAVEditControl()
{
mControlType = WebDAVControlTypeEnum.Attachment;
}
#endregion
#region "Methods"
///
/// Gets the attachment URL.
///
protected override string GetUrl()
{
string nodeAliasPath = NodeAliasPath;
// Get group sub node alias path
if (GroupNode != null)
{
if (nodeAliasPath.StartsWithCSafe(GroupNode.NodeAliasPath, true))
{
nodeAliasPath = nodeAliasPath.Remove(0, GroupNode.NodeAliasPath.Length);
}
}
return AttachmentURLProvider.GetAttachmentWebDAVUrl(SiteName, nodeAliasPath, NodeCultureCode, AttachmentFieldName, FileName, GroupName);
}
#endregion
}