Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 10 of 10

Thread: Modifying TopMenu behavior.

  1. #1
    loic is offline Junior Member
    Join Date
    Jun 2010
    Posts
    1

    Default Modifying TopMenu behavior.

    Hi all, I have downloaded the demo of AspDotNetStorefront and have been playing around with skinning it. Now there is only one thing I don’t like, that is the TopMenu. Well more so the lack of diversity. From what I understand is there are only 2 options, the default (!menu.Categories!) and (!menu.Categories0!). Now these are 2 great options but not exactly what I want. Below is a crude drawing of how I want to make it.

    Is there some documentation somewhere on how I can modify the menu?

  2. #2
    seasonalsin is offline Senior Member
    Join Date
    Nov 2006
    Posts
    123

    Default

    You could surely do this by customizing the source code I am sure. I am not a programmer but about anything can be accomplished with this cart.

    Another option would be to build them into the site manually using CSS and jQuery. If your categories do not change a lot, this could be a great and cheap option for you.

    Below is a link to a tutorial telling how to do this.

    http://www.sohtanaka.com/web-design/...-w-css-jquery/

    Hope this helps.
    Shawn

    http://www.FirstChoiceMarine.com

    Currently 7.1 moving to MS9.3

  3. #3
    Timmey is offline Junior Member
    Join Date
    May 2010
    Location
    Germany
    Posts
    25

    Default

    Hi,

    do you have the sourcecode version?
    I did exactly what you are trying to do.

    Its based on the default menu with a rendering to an HTML List.

    Cheers
    Timmey
    Attached Images Attached Images  

  4. #4
    bengdell is offline Junior Member
    Join Date
    Jul 2010
    Posts
    0

    Default

    Hi Timmey, would you mind sharing the code you wrote to create that menu? I am trying to do the same thing and your example looks like just what I am trying to do.

    Thank you very much

  5. #5
    Tek7 is offline Senior Member
    Join Date
    May 2006
    Posts
    137

    Default

    Timmey - Could you share how you did that? That's exactly what I need to do. TIA!
    May

  6. #6
    Timmey is offline Junior Member
    Join Date
    May 2010
    Location
    Germany
    Posts
    25

    Default

    Sorry guys I was on Vacation!

    Yes for sure I will share it. I will create a ZIP with the content, it affords more then a few changes

  7. #7
    Timmey is offline Junior Member
    Join Date
    May 2010
    Location
    Germany
    Posts
    25

    Default

    I just sorted a few things out and check out the source.

    What we are going to implement: MegaDropDown with JQuery.
    I think it should work in ALL Versions, even the no code options since the MasterPageBase is open.

    Background:
    I was in need of a MegaDropdown Menu, the most easy way, is use an already Databound Item, mostly the easiest and performance way too, BUT Only if you ain't the sitemap guru!

    SHORT: Databound ASP MENU -> get items, insert into a List add scripts thats it.

    OKay, okay, here we go!

    HOW TO:


    Open the file: web -> app_code -> MasterPageBase.cs
    Insert the function from "menudropdown.cs" into MasterPageBase.cs below the SetMenu(); (You can put it anywhere, but for sourcelook its better)

    Remove all the script appendings in SetMenu, this would cause a JS Error in the frontend.

    Create 2 Members:
    protected Literal anchorLiteral and protected Literal menuLiteral;

    Register the OnDataBound function to the aspmenu.

    Thats the source thing...

    Open your Masterpage Template and add the Literals to the HTML and place them where you need, e.g. div#header

    Now you only need the JQuerys for infos check out this awesome piece of blog:
    http://www.sohtanaka.com/web-design/...-w-css-jquery/

    It should work out of the box with the CSS, may be other ID's or classes, but setting them probably you will have something sweet like on the blog.

    Attachment Info: Download and RENAME to .cs I couldnt upload a cs file here, so just remove the zip in filename.


    Pls tell me how it worked for you

    Cheers
    Timmey
    Attached Files Attached Files

  8. #8
    cjbarth is offline Senior Member
    Join Date
    Oct 2008
    Posts
    392

    Default

    That looks pretty cool, however, for maintainability reasons, I would advise against using all those strings and instead use XML to build the HTML that you need. .Net has the very powerful XmlDocument class that helps make sure that code stays readable and maintainable by keeping track of opening and closing tags for you.
    Last edited by cjbarth; 08-30-2010 at 05:24 AM.
    ML9.3.1.1
    SQL 2012 Express
    VS 2010
    Azure VM

  9. #9
    Timmey is offline Junior Member
    Join Date
    May 2010
    Location
    Germany
    Posts
    25

    Default

    Gonna Upload the ZIP again.

    @CJBarth This solution is pretty flexible. I may update it, but at first I need to remove all the Static inline codes for the carts and everywhere. When this looks nice, I'm gonna move it.

  10. #10
    data77 is offline Member
    Join Date
    Oct 2010
    Posts
    75

    Default

    waiting for you! lol
    thanks
    Eat my code!
    Multistore V 9 sp1
    Best Hosting for your storefront Business in 2011

    http://fasoservice.com
    world wide directory submission
    http://Nanalist.com
    Burkina24 Media news in Burkina Faso
    http://burkina24.com