Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > CategoryList active Item View modes: 
User avatar
Member
Member
alexo - 5/3/2011 7:06:13 AM
   
CategoryList active Item
Hi there!

has anyone an idea to flag/highlight the active item in a categoryList? I still can't get it so please help me!


thx

alex

User avatar
Member
Member
kentico_alleng - 5/5/2011 12:15:02 PM
   
RE:CategoryList active Item
Hi Alex,

You should be able to handle this in the transformation.

Using the Corporate Site template as an example, go to:

Examples > Web parts > Tagging & Categories > Category List

Edit the category list and change the transformation to:

<div class="CategoryList" style="padding-bottom: 7px; <%#  Request.QueryString["categoryid"] != null ? (int)Eval("CategoryID") == int.Parse(Request.QueryString["categoryid"]) ? "font-weight: bold;": "" :"" %> ">
<asp:HyperLink ID="lnkCategoryList" runat="server" />
</div>


Keep in mind that this is just an example of how you could handle this. It hasn't been fully tested, and there are other checks you could perform and changes you could make. For instance, you could check document name and change the class instead of the inline style.

Regards,

Allen Greenhaw

User avatar
Member
Member
alexo - 5/9/2011 5:30:15 AM
   
RE:CategoryList active Item
thank you so much allen! that was exactly what i was looking for... i use it with a "current" class...


THX a lot!

regards, alex