本文整理汇总了C#中DotNetNuke.Entities.Tabs.TabController.CreateContentItem方法的典型用法代码示例。如果您正苦于以下问题:C# TabController.CreateContentItem方法的具体用法?C# TabController.CreateContentItem怎么用?C# TabController.CreateContentItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Tabs.TabController
的用法示例。
在下文中一共展示了TabController.CreateContentItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnInit
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
jQuery.RequestDnnPluginsRegistration();
cboCacheProvider.SelectedIndexChanged += cboCacheProvider_Change;
cboCopyPage.SelectedIndexChanged += cboCopyPage_SelectedIndexChanged;
cboFolders.SelectedIndexChanged += cboFolders_SelectedIndexChanged;
cboParentTab.SelectedIndexChanged += cboParentTab_SelectedIndexChanged;
cmdClearAllPageCache.Click += cmdClearAllPageCache_Click;
cmdClearPageCache.Click += cmdClearPageCache_Click;
cmdCopyPerm.Click += cmdCopyPerm_Click;
cmdCopySkin.Click += cmdCopySkin_Click;
cmdDelete.Click += cmdDelete_Click;
cmdUpdate.Click += cmdUpdate_Click;
editDefaultCultureButton.Command += editDefaultCultureButton_Command;
localizePagesButton.Click += localizePagesButton_Click;
moduleLocalization.ModuleLocalizationChanged += moduleLocalization_ModuleLocalizationChanged;
tabLocalization.TabLocalizationChanged += tabLocalization_ModuleLocalizationChanged;
publishPageButton.Click += publishPageButton_Click;
rbInsertPosition.SelectedIndexChanged += rbInsertPosition_SelectedIndexChanged;
rblCacheIncludeExclude.SelectedIndexChanged += rblCacheIncludeExclude_Change;
readyForTranslationButton.Click += readyForTranslationButton_Click;
cmdSubmitTranslation.Click += submitTranslation_Click;
cmdCancelTranslation.Click += cancelTranslation_Click;
translatedCheckbox.CheckedChanged += translatedCheckbox_CheckedChanged;
viewDefaultCultureButton.Command += viewDefaultCultureButton_Command;
// Verify that the current user has access to edit this module
if (!TabPermissionController.HasTabPermission("ADD,EDIT,COPY,DELETE,MANAGE"))
{
Response.Redirect(Globals.AccessDeniedURL(), true);
}
if ((Request.QueryString["action"] != null))
{
_strAction = Request.QueryString["action"].ToLower();
}
if (Tab.ContentItemId == Null.NullInteger && Tab.TabID != Null.NullInteger)
{
var tabCtl = new TabController();
//This tab does not have a valid ContentItem
tabCtl.CreateContentItem(Tab);
tabCtl.UpdateTab(Tab);
}
moduleLocalization.TabId = TabId;
moduleLocalization.ShowEditColumn = false;
DisableHostAdminFunctions();
}
示例2: OnInit
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
jQuery.RequestDnnPluginsRegistration();
ClientResourceManager.RegisterScript(Page, "~/Resources/Shared/Scripts/dnn.extensions.js", FileOrder.Js.DefaultPriority);
ClientResourceManager.RegisterScript(Page, "~/Resources/Shared/scripts/dnn.jquery.extensions.js", FileOrder.Js.DefaultPriority + 1);
ClientResourceManager.RegisterScript(Page, "~/DesktopModules/Admin/Tabs/ClientScripts/dnn.PageUrl.js", FileOrder.Js.DefaultPriority + 2);
ServicesFramework.Instance.RequestAjaxAntiForgerySupport();
cboCacheProvider.SelectedIndexChanged += cboCacheProvider_Change;
cboCopyPage.SelectionChanged += cboCopyPage_SelectedIndexChanged;
cboFolders.SelectionChanged += cboFolders_SelectedIndexChanged;
cboParentTab.SelectionChanged += cboParentTab_SelectedIndexChanged;
cmdClearAllPageCache.Click += cmdClearAllPageCache_Click;
cmdClearPageCache.Click += cmdClearPageCache_Click;
cmdCopyPerm.Click += cmdCopyPerm_Click;
cmdCopySkin.Click += cmdCopySkin_Click;
cmdDelete.Click += cmdDelete_Click;
cmdUpdate.Click += cmdUpdate_Click;
rblCacheIncludeExclude.SelectedIndexChanged += rblCacheIncludeExclude_Change;
readyForTranslationButton.Click += readyForTranslationButton_Click;
cmdSubmitTranslation.Click += submitTranslation_Click;
cmdCancelTranslation.Click += cancelTranslation_Click;
// Verify that the current user has access to edit this module
if (!TabPermissionController.HasTabPermission("ADD,EDIT,COPY,DELETE,MANAGE"))
{
Response.Redirect(Globals.AccessDeniedURL(), true);
}
if ((Request.QueryString["action"] != null))
{
_strAction = Request.QueryString["action"].ToLower();
}
if (Tab.ContentItemId == Null.NullInteger && Tab.TabID != Null.NullInteger)
{
var tabCtl = new TabController();
//This tab does not have a valid ContentItem
tabCtl.CreateContentItem(Tab);
tabCtl.UpdateTab(Tab);
}
DisableHostAdminFunctions();
if (PortalSettings.ActiveTab.IsSuperTab || PortalSecurity.IsInRole("Administrators") || PortalSettings.ActiveTab.ParentId == Null.NullInteger)
{
// Add Non Specified if user is Admin or if current tab is already on the top level
cboParentTab.UndefinedItem = new ListItem(SharedConstants.Unspecified, string.Empty);
}
cboCopyPage.UndefinedItem = new ListItem(SharedConstants.Unspecified, string.Empty);
PortalAliasCaption.Text = PortalAlias.HTTPAlias;
PortalAliasCaption.ToolTip = PortalAlias.HTTPAlias;
UrlContainer.Attributes.Add(HtmlTextWriterAttribute.Class.ToString(), "um-page-url-container");
}
示例3: CopyDesignToChildren
/// <summary>
/// Copies the design to children.
/// </summary>
/// <param name="parentTab">The parent tab.</param>
/// <param name="skinSrc">The skin SRC.</param>
/// <param name="containerSrc">The container SRC.</param>
/// <param name="cultureCode">The culture code.</param>
public static void CopyDesignToChildren(TabInfo parentTab, string skinSrc, string containerSrc,
string cultureCode)
{
bool clearCache = Null.NullBoolean;
var tabController = new TabController();
List<TabInfo> childTabs = tabController.GetTabsByPortal(parentTab.PortalID).DescendentsOf(parentTab.TabID);
foreach (TabInfo tab in childTabs)
{
if (TabPermissionController.CanAdminPage(tab))
{
//Update ContentItem If neccessary
if (tab.ContentItemId == Null.NullInteger && tab.TabID != Null.NullInteger)
{
tabController.CreateContentItem(tab);
}
Provider.UpdateTab(tab.TabID,
tab.ContentItemId,
tab.PortalID,
tab.VersionGuid,
tab.DefaultLanguageGuid,
tab.LocalizedVersionGuid,
tab.TabName,
tab.IsVisible,
tab.DisableLink,
tab.ParentId,
tab.IconFileRaw,
tab.IconFileLargeRaw,
tab.Title,
tab.Description,
tab.KeyWords,
tab.IsDeleted,
tab.Url,
skinSrc,
containerSrc,
tab.StartDate,
tab.EndDate,
tab.RefreshInterval,
tab.PageHeadText,
tab.IsSecure,
tab.PermanentRedirect,
tab.SiteMapPriority,
UserController.GetCurrentUserInfo().UserID,
tab.CultureCode);
UpdateTabVersion(tab.TabID);
var eventLogController = new EventLogController();
eventLogController.AddLog(tab, PortalController.GetCurrentPortalSettings(),
UserController.GetCurrentUserInfo().UserID, "",
EventLogController.EventLogType.TAB_UPDATED);
clearCache = true;
}
}
if (clearCache)
{
DataCache.ClearTabsCache(childTabs[0].PortalID);
}
}