Add new admin pages - highlighting.

Aug 19, 2007 at 12:33 AM
Hi,

I've looked to the soure which is very good,
today , i've added an new item to the admin pages. Named "SubCategories".

First impression : Okay, but if i look further, i see 2 items are highlighted.
  • Categories
  • Subcategories.

In the source is see you use RawUrl.EndsWith --> and that contains both categories stuff.

So i've changed the source so the highlighting item on the tabmen shows the right item now.

Original source : (from : menu.ascx.cs)
====================================
if (Request.RawUrl.EndsWith(info.Name, StringComparison.OrdinalIgnoreCase))
a.Attributes"class" = "current";
====================================

Changed to :
====================================
String[] mPageArr = Request.RawUrl.Split('/');
String mPage = mPageArrmPageArr.Length - 1;
if (mPage == info.Name)
a.Attributes"class" = "current";
====================================

Maybe this can be added to the new release :-)

Regards,
P.




So i've changed the code in the menu.cs.asx file.