ASPX templates
Version 5.x > ASPX templates > Categorylist with CustomCategories View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
adam-syndicut - 5/11/2011 6:43:09 AM
   
Categorylist with CustomCategories
i have this code

<uc1:CategoryList runat="server" ID="CategoryList" AliasPath="/Blog/%" DocumentListUrl="/Blog/" DisplayCustomCategories="true" DisplayGlobalCategories="true" TransformationName="cms.blog.CategoryList" OrderBy="CategoryDisplayName" HideControlForZeroRows="false" ShowForDocumentTypes="cms.blog;cms.blogmonth;cms.blogpost" Visible="true" HideOnSubPages="false" ZeroRowsText="No Categories" QueryStringName="categoryid"  />


in site manager i have set up some Globalcategories and in the documents properties i have selected the gloablcategory and also created and selected customcategories

problem i'm having is its only displaying globalcategories and if i delete the globals it just displays the zero rows text.

any ideas what i'm missing?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/16/2011 1:24:39 AM
   
RE:Categorylist with CustomCategories
Hi,

Please find an inspiration in below example which displays global and custom categories:


<%@ Register Src="~/CMSWebParts/TaggingCategories/categorylist.ascx" TagName="categorylist"
TagPrefix="uc1" %>

<uc1:repeater ID="categoryArticles" runat="server" ClassNames="cms.article" Path="/Examples/WebParts/Tagging---Categories/Category-list/%" TransformationName="CMS.Article.SimplePreview" SelectedItemTransformationName="CMS.Article.Default" EnableViewState="false" />

<uc1:categorylist runat="server" ID="categorylist" TransformationName="community.transformations.CategoryList" ShowForDocumentTypes="CMS.MenuItem" AliasPath="/Examples/Webparts/Tagging---Categories/Category-list/%" EnableViewState="false" />


This code comes from default Corporate site Aspx: ~/CMSTemplates/CorporateSiteASPX/WebParts/TaggingCategories.aspx

If for some document in /Examples/WebParts/Tagging---Categories/Category-list/ folder is selected custom or global category in Properties, this category is displayed in the category list webpart.

Best regards,
Ivana Tomanickova