当前位置: 首页>>代码示例>>C#>>正文


C# ContentAPI.GetChildFolders方法代码示例

本文整理汇总了C#中ContentAPI.GetChildFolders方法的典型用法代码示例。如果您正苦于以下问题:C# ContentAPI.GetChildFolders方法的具体用法?C# ContentAPI.GetChildFolders怎么用?C# ContentAPI.GetChildFolders使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ContentAPI的用法示例。


在下文中一共展示了ContentAPI.GetChildFolders方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Display_UpdateQlinkTemplateByCategory

    private void Display_UpdateQlinkTemplateByCategory()
    {
        hdnIsPostBack.Value = "false";

        //FormAction = "LangType=" & m_intContentLanguage & "&action=DoUpdateQlinkTemplateByCategory"
        //SetPostBackPage()
        FolderData folder_data;
        PermissionData security_data;
        LibraryData[] library_data;
        librarytoolbar m_libraryToolBar;
        int i = 0;

        _FolderId = Convert.ToInt64(Request.QueryString["id"]);
        folder_data = _ContentApi.GetFolderById(_FolderId);
        security_data = _ContentApi.LoadPermissions(_FolderId, "folder", 0);
        _CurrentPageNumber = System.Convert.ToInt32(this.uxPagingUpdateLink.SelectedPage);

        library_data = _ContentApi.GetAllChildLibItemsByType(_Type, _FolderId, _OrderBy, System.Convert.ToInt32(_CurrentPageNumber + 1), m_refcontentapi.RequestInformationRef.PagingSize, ref _TotalPagesNumber);

        //Fix for Assets in a multisite enviroment [workarea/library.aspx.vb]
        Microsoft.VisualBasic.Collection fCol = new Microsoft.VisualBasic.Collection();
        Ektron.Cms.API.Folder fapi = new Ektron.Cms.API.Folder();
        Ektron.Cms.FolderData[] fdata;
        Ektron.Cms.Content.EkContent m_refContent;
        ContentAPI m_refContentApi = new ContentAPI();

        m_refContent = m_refContentApi.EkContentRef;

        fdata = m_refContentApi.GetChildFolders(0, false, EkEnumeration.FolderOrderBy.Name);
        if (fdata != null)
        {
            foreach (FolderData thisfdata in fdata)
            {
                if (thisfdata.FolderType == 2)
                {
                    fCol = m_refContent.GetFolderInfov2_0(thisfdata.Id);
                    foreach (LibraryData thisresult in library_data)
                    {
                        thisresult.FileName = Regex.Replace(thisresult.FileName, "http://" + fCol["DomainProduction"] + "javascript", "javascript");
                    }
                }
            }
        }
        //End fix for multisite and Assets

        m_libraryToolBar = (librarytoolbar)(LoadControl("controls/library/librarytoolbar.ascx"));
        ToolBarHolder.Controls.Add(m_libraryToolBar);
        m_libraryToolBar.AppImgPath = _AppImgPath;
        m_libraryToolBar.PageAction = _PageAction;
        m_libraryToolBar.FolderInfo = folder_data;
        m_libraryToolBar.SecurityInfo = security_data;
        m_libraryToolBar.FolderId = _FolderId;
        m_libraryToolBar.ContentLanguage = _ContentLanguage;
        m_libraryToolBar.LibType = _Type;
        UpdateQlinkTemplateByCategoryPanel.Visible = true;

        qlinkfrom.InnerHtml = _SitePath + "<input type=\"textbox\" size=\"50\" maxlength=\"255\" value=\"" + folder_data.TemplateFileName + "\" name=\"template_from\"/>";
        qlinkto.InnerHtml = _SitePath + "<input type=\"textbox\" size=\"50\" maxlength=\"255\" value=\"" + folder_data.TemplateFileName + "\" name=\"template_to\"/>";

        System.Web.UI.WebControls.BoundColumn colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "CHECK";
        colBound.HeaderText = "<input type=\"checkbox\" name=\"all\" onclick=\"javascript:checkAll(document.forms[0].all.checked);\"/>";
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Top;
        colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
        colBound.HeaderStyle.CssClass = "title-header";
        QlinkTemplateByCategoryGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "TITLE";
        colBound.HeaderText = "<a href=\"library.aspx?LangType=" + _ContentLanguage + "&action=ViewLibraryByCategory&orderby=LibraryTitle&id=" + _FolderId + "&type=" + _Type + "\" title=\"" + _MessageHelper.GetMessage("click to sort msg") + "\">" + _MessageHelper.GetMessage("generic Title") + "</a>";
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Top;
        colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
        colBound.HeaderStyle.CssClass = "title-header";
        QlinkTemplateByCategoryGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "ID";
        colBound.HeaderText = "<a href=\"library.aspx?LangType=" + _ContentLanguage + "&action=ViewLibraryByCategory&orderby=LibraryID&id=" + _FolderId + "&type=" + _Type + "\" title=\"" + _MessageHelper.GetMessage("click to sort msg") + "\">" + _MessageHelper.GetMessage("generic ID") + "</a>";
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Top;
        colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
        colBound.HeaderStyle.CssClass = "title-header";
        QlinkTemplateByCategoryGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "DATEMODIFIED";
        colBound.HeaderText = "<a href=\"library.aspx?LangType=" + _ContentLanguage + "&action=ViewLibraryByCategory&orderby=date&id=" + _FolderId + "&type=" + _Type + "\" title=\"" + _MessageHelper.GetMessage("click to sort msg") + "\">" + _MessageHelper.GetMessage("generic Date Modified") + "</a>";
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Top;
        colBound.ItemStyle.HorizontalAlign = HorizontalAlign.Left;
        colBound.HeaderStyle.CssClass = "title-header";
        QlinkTemplateByCategoryGrid.Columns.Add(colBound);

        colBound = new System.Web.UI.WebControls.BoundColumn();
        colBound.DataField = "FILENAME";
        colBound.HeaderText = "<a href=\"library.aspx?LangType=" + _ContentLanguage + "&action=ViewLibraryByCategory&orderby=LibraryFilename&id=" + _FolderId + "&type=" + _Type + "\" title=\"" + _MessageHelper.GetMessage("click to sort msg") + "\">" + _MessageHelper.GetMessage("generic URL Link") + "</a>";
        colBound.ItemStyle.Wrap = false;
        colBound.ItemStyle.VerticalAlign = VerticalAlign.Top;
//.........这里部分代码省略.........
开发者ID:jaytem,项目名称:minGit,代码行数:101,代码来源:library.aspx.cs


注:本文中的ContentAPI.GetChildFolders方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。