private void buildRelatedTagList(int howManyCellsInRow) { tagService = factory.GetTagService(); int[] documentids = new int[1]; documentids[0] = docId; TagInfo[] tags = null; //0 表示不限取得 tags 的數量 //tags = recommender.GetRelatedTags(currentUser, documentids, 0); //這是找出跟這邊文章相關的標籤 tags = tagService.GetTagsByDocument(docId, 0); //貼在這邊文章上的所有標籤 //沒有任何 tags 的話就結束吧 if ((tags == null) || (tags.Length == 0)) { tagCloudZone.Visible = false; return; } //計算一下要幾欄幾列 TagCloud cloud = tagService.TransferToTagCloud(tags, 7, 7, 1, currentUser.SubjectId); TagCloudElement[] elements = cloud.Elements; if (elements != null && elements.Length > 0) { drawTable(elements); } }