Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
-
JKstang
- Ensign (ENS)

- Posts: 13
- Joined: Tue Feb 17, 2009 3:17 pm
Post
by JKstang » Fri Jul 10, 2009 5:13 pm
We would like to do some minor customizations to our (work in progress) website. We have modified the stardard header scriptlet to show direct links to otherwise hidden categories.
As seen below:

Two of the categories (Customer Service & Company Info) have webpages added to them.
Instead of clicking the category link and then having to click the link to the webpage, we would like to have the the selection of the webpages drop-down from the category as seen at:
http://www.eurekaclothing.com/.
Can someone please PM me with a quote for what something like this would cost.
Thank You,
Jeremy
-
Khaliq
- Lieutenant, Jr. Grade (LT JG)

- Posts: 26
- Joined: Tue Dec 16, 2008 2:00 am
Post
by Khaliq » Sat Jul 11, 2009 3:12 am
Here is a solution for you. If you need more help please contact Plugables.
You can create webpage menu very easily by putting an ASP.NET menu control and some code to populate it with webpages from a specific category.
Create a file
WebpageMenu.ascx in your applicatoin's
ConLib/Custom folder and put following code in it.
Code: Select all
<%@ Control Language="C#" ClassName="WebPageMenu" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
int categoryId = PageHelper.GetCategoryId();
Category category = CategoryDataSource.Load(categoryId);
if (category != null)
{
MenuItem categoryMenuItem = new MenuItem();
categoryMenuItem.Text = category.Name;
categoryMenuItem.NavigateUrl = category.NavigateUrl;
CatalogNodeCollection catalogNodes = CatalogDataSource.LoadForCategory(categoryId, true);
foreach (CatalogNode catalogNode in catalogNodes)
{
if (catalogNode.CatalogNodeType == CatalogNodeType.Webpage)
{
Webpage webpage = (Webpage)catalogNode.ChildObject;
MenuItem menuItem = new MenuItem();
menuItem.Text = webpage.Name;
menuItem.NavigateUrl = webpage.NavigateUrl;
categoryMenuItem.ChildItems.Add(menuItem);
}
}
WebpageMenu.Items.Add(categoryMenuItem);
}
}
</script>
<asp:Menu ID="WebpageMenu" runat="server" Orientation="Horizontal">
<StaticMenuItemStyle BackColor="#CBC2B9" Font-Bold="True" Font-Size="Small"
ForeColor="Black" Width="150px" />
<DynamicMenuItemStyle BackColor="#7B7066" Font-Bold="True" Font-Size="X-Small"
ForeColor="White" Width="150px" />
</asp:Menu>
Use this control on some page where Category Id is available. For example in Category Grid Page scriptlet it will be
To use it for a specific category you can slightly modify the code to use a specific category instead of getting one from the context.
-
deadlybuda
- Lieutenant, Jr. Grade (LT JG)

- Posts: 22
- Joined: Wed Jun 24, 2009 3:39 pm
Post
by deadlybuda » Fri Jul 17, 2009 2:42 pm
Hi guys, thanks for the replies. It still doesn't answer my question though. I am trying to only show 1 category with the drop down menu.
-
mazhar
- Master Yoda

- Posts: 5084
- Joined: Wed Jul 09, 2008 8:21 am
-
Contact:
Post
by mazhar » Mon Jul 20, 2009 4:06 am
in above code instead of
Code: Select all
int categoryId = PageHelper.GetCategoryId();
you can specify category id you want to be listed like
where 33 represents the category id yours may be different.