目前,使用Ektron CMS,我試圖在受保護的/私人內容旁邊放置一個lock.jpg,如果單擊該鏈接,需要用戶登錄。如何在私人內容旁邊放置/引用鎖
我不知道如何開始或去這個?
任何想法或實現這一點的片段將不勝感激。
謝謝, 羅恩。
目前,使用Ektron CMS,我試圖在受保護的/私人內容旁邊放置一個lock.jpg,如果單擊該鏈接,需要用戶登錄。如何在私人內容旁邊放置/引用鎖
我不知道如何開始或去這個?
任何想法或實現這一點的片段將不勝感激。
謝謝, 羅恩。
ContentData對象具有您可以查看的IsPrivate屬性。在最新的(v8.5)中,我會做以下事情。在後面的代碼:
ContentManager contentManager = new ContentManager();
ContentCriteria criteria = new ContentCriteria();
criteria.AddFilter(ContentProperty.FolderId,
CriteriaFilterOperator.EqualTo,
folderId);
List<ContentData> list = contentManager.GetList(criteria);
Listview1.DataSource = list;
Listview1.DataBind();
對於使用報表,則需要以下內容:
using Ektron.Cms;
using Ektron.Cms.Common;
using Ektron.Cms.Framework;
using Ektron.Cms.Content;
using Ektron.Cms.Framework.Content;
然後在ASP.NET模板,我會用一個標準的ListView ASP.NET服務器控件:
<asp:listview ID="Listview1" runat="server">
<ItemTemplate>
<div>
<li><img src="<%#Eval("IsPrivate") %>.jpg" /><%#Eval("Title") %></li>
</div>
</ItemTemplate>
</asp:listview>
這會讓你朝着正確的方向前進。有關v8.5框架API的更多信息,請參閱此網絡研討會http://www.ektron.com/Resources/Webinars/Framework-API/
感謝Bill,哇,Ektron的CTO本人的完美解決方案。 !我會試試這個,再次感謝。 – Ron
請認真對待自己並切換到其他CMS。 – wsanville
好吧,我所要做的就是,將一個鎖定jpg放在受保護內容的旁邊,並且作爲一個新手,我不確定如何完成此操作。 – Ron
它是否必須是.jpg?鏈接如何顯示?你可以使用一個帶鎖字符的字體嗎? –