Inheritance: ModuleBase, IActionable
        private void LoadControlType()
        {
            this.UseCache = false;
            if (this.ItemVersionId == -1)
            {
                this.BindItemData(true);
            }
            else
            {
                this.BindItemData();
            }

            // Item Edit
            this.itemEditControl = (ItemEdit)this.LoadControl(ItemControlToLoad);
            this.itemEditControl.ModuleConfiguration = this.ModuleConfiguration;
            this.itemEditControl.ID = Path.GetFileNameWithoutExtension(ItemControlToLoad);
            this.itemEditControl.VersionInfoObject = this.VersionInfoObject;
            this.phItemEdit.Controls.Add(this.itemEditControl);

            if (SecurityFilter.IsSecurityEnabled(this.PortalId))
            {
                this.trCategoryPermissions.Visible = true;

                this.categoryPermissions = (CategoryPermissions)this.LoadControl("../CategoryControls/CategoryPermissions.ascx");
                this.categoryPermissions.CategoryId = this.VersionInfoObject.ItemId;
                this.categoryPermissions.ModuleConfiguration = this.ModuleConfiguration;
                this.phCategoryPermissions.Controls.Add(this.categoryPermissions);
            }

            // Parent Category
            this.parentCategoryRelationships = (ItemRelationships)this.LoadControl("../controls/ItemRelationships.ascx");
            this.parentCategoryRelationships.ExcludeCircularRelationships = true;
            this.parentCategoryRelationships.ModuleConfiguration = this.ModuleConfiguration;
            this.parentCategoryRelationships.LocalResourceFile = this.ItemRelationshipResourceFile;
            this.parentCategoryRelationships.VersionInfoObject = this.VersionInfoObject;
            this.parentCategoryRelationships.ListRelationshipTypeId = RelationshipType.ItemToParentCategory.GetId();
            this.parentCategoryRelationships.CreateRelationshipTypeId = RelationshipType.ItemToParentCategory.GetId();
            this.parentCategoryRelationships.AvailableSelectionMode = ListSelectionMode.Single;
            this.parentCategoryRelationships.FlatView = true;
            this.parentCategoryRelationships.ItemTypeId = ItemType.Category.GetId();
            this.phParentCategory.Controls.Add(this.parentCategoryRelationships);

            // Related Categories
            // this.irRelated = (ItemRelationships)LoadControl("../controls/ItemRelationships.ascx");
            // this.irRelated.ModuleConfiguration = ModuleConfiguration;
            // this.irRelated.LocalResourceFile = ItemRelationshipResourceFile;
            // this.irRelated.VersionInfoObject = VersionInfoObject;
            // this.irRelated.ListRelationshipTypeId = RelationshipType.ItemToRelatedCategory.GetId();
            // this.irRelated.CreateRelationshipTypeId = RelationshipType.ItemToRelatedCategory.GetId();
            // this.irRelated.AvailableSelectionMode = ListSelectionMode.Multiple;
            // this.irRelated.FlatView = true;
            // this.irRelated.ItemTypeId = ItemType.Category.GetId();
            // this.phParentCategory.Controls.Add(this.irRelated);

            // Featured Articles
            this.featuredArticlesRelationships = (ItemRelationships)this.LoadControl("../controls/ItemRelationships.ascx");
            this.featuredArticlesRelationships.ModuleConfiguration = this.ModuleConfiguration;
            this.featuredArticlesRelationships.VersionInfoObject = this.VersionInfoObject;
            this.featuredArticlesRelationships.LocalResourceFile = this.ItemRelationshipResourceFile;
            this.featuredArticlesRelationships.ListRelationshipTypeId = RelationshipType.ItemToParentCategory.GetId();
            this.featuredArticlesRelationships.CreateRelationshipTypeId = RelationshipType.ItemToFeaturedItem.GetId();
            this.featuredArticlesRelationships.AvailableSelectionMode = ListSelectionMode.Multiple;
            this.featuredArticlesRelationships.FlatView = true;
            this.featuredArticlesRelationships.EnableDates = true;
            this.featuredArticlesRelationships.AllowSearch = true;
            this.featuredArticlesRelationships.EnableSortOrder = true;
            this.featuredArticlesRelationships.ItemTypeId = ItemType.Article.GetId();
            this.phFeaturedArticles.Controls.Add(this.featuredArticlesRelationships);

            // load approval status
            this.itemApprovalStatus = (ItemApproval)this.LoadControl(ApprovalControlToLoad);
            this.itemApprovalStatus.ModuleConfiguration = this.ModuleConfiguration;
            this.itemApprovalStatus.ID = Path.GetFileNameWithoutExtension(ApprovalControlToLoad);
            this.itemApprovalStatus.VersionInfoObject = this.VersionInfoObject;
            this.phApproval.Controls.Add(this.itemApprovalStatus);
        }
        private void LoadControls()
        {
            this.thisComment = Comment.GetComment(this.CommentId, DataProvider.ModuleQualifier);
            this.cmdDelete.Visible = this.IsAdmin;

            // load text editor entries
            var l1 = (LabelControl)this.LoadControl("~/controls/LabelControl.ascx");
            l1.ResourceKey = "CommentText";
            this.phCommentText.Controls.Add(l1);
            this.TeArticleText = (TextEditor)this.LoadControl("~/controls/TextEditor.ascx");
            this.TeArticleText.HtmlEncode = false;
            this.TeArticleText.TextRenderMode = "Raw";
            this.TeArticleText.Width = 700;
            this.TeArticleText.Height = 400;
            this.TeArticleText.ChooseMode = false;
            this.phCommentText.Controls.Add(this.TeArticleText);

            // load approval status
            this.Ias = (ItemApproval)this.LoadControl(ApprovalControlToLoad);
            this.Ias.ModuleConfiguration = this.ModuleConfiguration;
            this.Ias.ID = Path.GetFileNameWithoutExtension(ApprovalControlToLoad);
            this.phApproval.Controls.Add(this.Ias);
        }
        private void LoadControlType()
        {
            this.UseCache = false;
            if (this.ItemVersionId == -1)
            {
                this.BindItemData(true);
                this.trArticleId.Visible = false;
                this.cmdDelete.Visible = false;
            }
            else
            {
                this.BindItemData();
                this.cmdDelete.Visible = this.IsAdmin;
            }

            var av = (Article)this.VersionInfoObject;

            // Item Edit
            this.itemEditControl = (ItemEdit)this.LoadControl(ItemControlToLoad);
            this.itemEditControl.ModuleConfiguration = this.ModuleConfiguration;
            this.itemEditControl.ID = Path.GetFileNameWithoutExtension(ItemControlToLoad);
            this.itemEditControl.VersionInfoObject = this.VersionInfoObject;
            this.phControls.Controls.Add(this.itemEditControl);

            // Article Text Editor
            this.TeArticleText = (TextEditor)this.LoadControl("~/controls/TextEditor.ascx");
            this.TeArticleText.HtmlEncode = false;
            this.TeArticleText.TextRenderMode = "Raw";
            this.TeArticleText.Width = this.ArticleEditWidth; // default values for the editor
            this.TeArticleText.Height = this.ArticleEditHeight; // default values for the editor
            this.TeArticleText.ChooseMode = true;
            this.phArticleText.Controls.Add(this.TeArticleText);
            this.TeArticleText.Text = av.ArticleText;

            // Parent Category Relationship
            this.parentCategoryRelationship = (ItemRelationships)this.LoadControl("../controls/ItemRelationships.ascx");
            this.parentCategoryRelationship.ModuleConfiguration = this.ModuleConfiguration;

            this.parentCategoryRelationship.LocalResourceFile = this.ItemrelationshipResourceFile;
            this.parentCategoryRelationship.VersionInfoObject = this.VersionInfoObject;
            this.parentCategoryRelationship.ListRelationshipTypeId = RelationshipType.ItemToParentCategory.GetId();
            this.parentCategoryRelationship.CreateRelationshipTypeId = RelationshipType.ItemToParentCategory.GetId();
            this.parentCategoryRelationship.AvailableSelectionMode = ListSelectionMode.Single;
            this.parentCategoryRelationship.IsRequired = true;
            this.parentCategoryRelationship.FlatView = true;
            this.parentCategoryRelationship.ItemTypeId = ItemType.Category.GetId();
            this.phParentCategory.Controls.Add(this.parentCategoryRelationship);

            // Related Category Relationship
            this.relatedCategoryRelationships = (ItemRelationships)this.LoadControl("../controls/ItemRelationships.ascx");
            this.relatedCategoryRelationships.ModuleConfiguration = this.ModuleConfiguration;
            this.relatedCategoryRelationships.LocalResourceFile = this.ItemrelationshipResourceFile;
            this.relatedCategoryRelationships.VersionInfoObject = this.VersionInfoObject;
            this.relatedCategoryRelationships.ListRelationshipTypeId = RelationshipType.ItemToParentCategory.GetId();
            this.relatedCategoryRelationships.CreateRelationshipTypeId = RelationshipType.ItemToRelatedCategory.GetId();
            this.relatedCategoryRelationships.AvailableSelectionMode = ListSelectionMode.Multiple;
            this.relatedCategoryRelationships.IsRequired = false;
            this.relatedCategoryRelationships.FlatView = true;
            this.relatedCategoryRelationships.ItemTypeId = ItemType.Category.GetId();
            this.phRelatedCategories.Controls.Add(this.relatedCategoryRelationships);

            // Related Articles Relationship
            this.relatedArticlesRelationships = (ItemRelationships)this.LoadControl("../controls/ItemRelationships.ascx");
            this.relatedArticlesRelationships.ModuleConfiguration = this.ModuleConfiguration;
            this.relatedArticlesRelationships.VersionInfoObject = this.VersionInfoObject;
            this.relatedArticlesRelationships.LocalResourceFile = this.ItemrelationshipResourceFile;
            this.relatedArticlesRelationships.ListRelationshipTypeId = RelationshipType.ItemToParentCategory.GetId();
            this.relatedArticlesRelationships.CreateRelationshipTypeId = RelationshipType.ItemToRelatedArticle.GetId();
            this.relatedArticlesRelationships.AvailableSelectionMode = ListSelectionMode.Multiple;
            this.relatedArticlesRelationships.FlatView = true;
            this.relatedArticlesRelationships.EnableDates = false;
            this.relatedArticlesRelationships.AllowSearch = true;
            this.relatedArticlesRelationships.EnableSortOrder = true;
            this.relatedArticlesRelationships.ItemTypeId = ItemType.Article.GetId();
            this.phRelatedArticles.Controls.Add(this.relatedArticlesRelationships);

            // Embedded Articles Relationship
            this.embeddedArticlesRelationships = (ItemRelationships)this.LoadControl("../controls/ItemRelationships.ascx");
            this.embeddedArticlesRelationships.ModuleConfiguration = this.ModuleConfiguration;
            this.embeddedArticlesRelationships.VersionInfoObject = this.VersionInfoObject;
            this.embeddedArticlesRelationships.LocalResourceFile = this.ItemrelationshipResourceFile;
            this.embeddedArticlesRelationships.ListRelationshipTypeId = RelationshipType.ItemToParentCategory.GetId();
            this.embeddedArticlesRelationships.CreateRelationshipTypeId = RelationshipType.ItemToArticleLinks.GetId();
            this.embeddedArticlesRelationships.AvailableSelectionMode = ListSelectionMode.Single;
            this.embeddedArticlesRelationships.FlatView = true;
            this.embeddedArticlesRelationships.EnableDates = false;
            this.embeddedArticlesRelationships.AllowSearch = true;
            this.embeddedArticlesRelationships.EnableSortOrder = false;
            this.embeddedArticlesRelationships.ItemTypeId = ItemType.Article.GetId();
            this.phEmbeddedArticle.Controls.Add(this.embeddedArticlesRelationships);

            // load approval status
            this.itemApprovalStatus = (ItemApproval)this.LoadControl(ApprovalControlToLoad);
            this.itemApprovalStatus.ModuleConfiguration = this.ModuleConfiguration;
            this.itemApprovalStatus.ID = Path.GetFileNameWithoutExtension(ApprovalControlToLoad);
            this.itemApprovalStatus.VersionInfoObject = this.VersionInfoObject;
            this.phApproval.Controls.Add(this.itemApprovalStatus);

            if (this.AllowTags)
            {
                this.rowTagEntry.Visible = true;
                var tagList = new StringBuilder(255);
                foreach (ItemTag it in this.VersionInfoObject.Tags)
                {
                    tagList.Append(Tag.GetTag(it.TagId, this.PortalId).Name);
                    tagList.Append(";");
                }

                this.tagEntryControl = (TagEntry)this.LoadControl(TagControlToLoad);
                this.tagEntryControl.ModuleConfiguration = this.ModuleConfiguration;
                this.tagEntryControl.ID = Path.GetFileNameWithoutExtension(TagControlToLoad);

                this.tagEntryControl.TagList = tagList.ToString();
                this.phTagEntry.Controls.Add(this.tagEntryControl);
            }
            else
            {
                this.rowTagEntry.Visible = false;
            }
        }