2
我已經添加以下代碼到新聞列表web部件的選擇轉型:內容分級控制總是隱藏
<%@ Register Src="~/CMSAdminControls/ContentRating/RatingControl.ascx" TagName="RatingControl" TagPrefix="cms" %>
<cms:RatingControl ID="elemRating" runat="server" Enabled="true" RatingType="Stars" ExternalValue='
<%# Convert.ToString(CMS.GlobalHelper.ValidationHelper.GetDouble(Eval("DocumentRatingValue"), 0)/((CMS.GlobalHelper.ValidationHelper.GetDouble(Eval("DocumentRatings"), 0) == 0?1:CMS.GlobalHelper.ValidationHelper.GetDouble(Eval("DocumentRatings"), 1)))) %>' />
選擇轉型的其餘部分是相同的默認值。
根據Kentico documentation這應該將webpart添加到新聞項目的詳細信息頁面。
出於某種原因,輸入標籤是越來越呈現如下:
<input type="hidden" name="p$lt$zoneContent$pageplaceholder$pageplaceholder$lt$News$NewsList$repItems$ctl00$ctl00$elemRating$RatingControl$elemRating_RatingExtender_ClientState" id="p_lt_zoneContent_pageplaceholder_pageplaceholder_lt_News_NewsList_repItems_ctl00_ctl00_elemRating_RatingControl_elemRating_RatingExtender_ClientState" value="0">
注意type="hidden"
屬性。這導致控件不呈現,我不知道在哪裏解決這個問題。
隱藏的輸入僅用於存儲值。你確定直接在它下面不是一個錨定標籤,其中有一堆跨度?這些依賴於CMSDesk.css中引用的CSS類。沒有這些,沒有明星甚至會顯示。 –
是的,你是對的。這是一個CSS問題。如果你在答案中提出這個問題,我會接受它。 – ZeroDivide