Odpovědět Creating a mega menu in WSP

  • 16. února 2012 13:25
    Moderátor
     
     

    hello,

    I'm working on creating a new theme for WSP.

    This one i however want to make WSP a bit more modern AND easy to navigate which automatically leads to a Mega menu (drop down menu)

    I however have difficulty finding out how WSP makes the link in the menu..

    Is there any easy way to create standard links (like domains, Web Sites, FTP Accounts etc) as in the Vertical menu in a Horizantal (custom) menu?

    Without making any/much source-code changes that is (as i do want to keep WSP easy to update)

    Any info, tips etc on this topic is welcome :)

    Regards,

    Marco


    Key4ce - ICT professionals: www.key4ce.com

Všechny reakce

  • 21. února 2012 8:02
    Moderátor
     
     

    Hi,

    Which menu do you refer to? If you mean the services menu(domain,web sites) for hosting spaces, you may check the SpaceMenu.cs file for the details. The path of file is "[Root of WebSitePanel Code]\WebsitePanel\Sources\WebsitePanel.WebPortal\DesktopModules\WebsitePanel\SpaceMenu.ascx.cs"

    Hope this helps, thanks.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com. Microsoft One Code Framework

  • 21. února 2012 8:15
     
     

    Hello,

    I came cross that file earlier..

    what i'm trying to do is quite simple in most cases for templating (in WSP this however seems impossible)

    1) Trying to create a Mega Menu (for links like Domains, Web sites, FTP Accounts, etc etc)

    2) Without the use of Existing vertical menu code

    So what i'm looking for is pretty much a way to put in a link (like Domains) in a Template file (for example Browse1.aspx)

    i'm guessing the link will look something like "<%# GetSpaceHomePageUrl((int)Eval("PackageID")) %>" but.. i cannot find a good way to make the href link in a template.

    I also came cross issues with Javascript which i guess has to do with asp:ScriptManager (as the javascripts work fine in the login screen.. just stop functioning propper after login).

    Regards,

    Marco


    www.key4ce.com

  • 21. února 2012 8:35
    Moderátor
     
     

    I'm not familiar with the coding part, so I feel sorry that I could not give you further suggestion on this part. However, for case of code designing, you may ask in asp.net forums for better suggestions. For retrieving the href link urls, I think you could take use of the methods in the code file mentioned above.

    Let me know if I could provide further information for you, thanks.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com. Microsoft One Code Framework

  • 21. února 2012 9:04
    Moderátor
     
     

    Well.. it seems the link method is nearly impossible to find..

    And i can ask asp.net forums but this is something about how WSP arranges their own links.. so it should be answered in the forum about that piece of code i think ;)

    Without a propper linking method it will be nearly impossible for people to make good and modern themes for WSP.. which is a real draw back.

    The same issue without understanding the javascript part...

    I nearly finished the theme tho.. but it's just nothing like a modern website duo to WSP limitations :)


    Key4ce - ICT professionals: www.key4ce.com

  • 21. února 2012 9:08
    Moderátor
     
     
    I will have a try to see if I can retrieve the link urls. Will let you if I have any further progress.

    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com. Microsoft One Code Framework



  • 23. února 2012 8:12
    Moderátor
     
     Odpovědět Obsahuje kód

    Hello Marco,

    I notice the link url is a format like "~/default.aspx?pid=xxx&spaceId=xxx", and after some investigation, I managed to retrieve this url, although the method could be not so elegant. The code looks like:

    string url = string.Format("{0}&SpaceId={1}", WebsitePanel.Portal.PortalUtils.GetSpaceMenuItem("KEY").NavigateUrl, WebsitePanel.Portal.PanelSecurity.PackageId);

    The KEY in above code snipet is defined in App_Data/ModuleData.Config under SpaceMenu module declaration. You may see PageId attribute defined for menuitem entries. Actually, the pageId value is really the one of pid in url query string, but a format of Space+KEY, where KEY should be specified in the above code.

    I hope this could help you.

    Thanks.


    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com. Microsoft One Code Framework


  • 24. února 2012 16:23
    Moderátor
     
     

    hey Lloyd,

    Thank you for that answer. 

    This will defenatly help me with the next big WSP theme (this will start next month and finished within 3 months)

    So thank you for that! 

    atleast i can make additional links in places where i want them to be with this code :)

    All i need now is to brush up my asp scriptmanager understanding and the mega menu will be a sure thing :D (same as modern javascript effects ^^)

    Regards,

    Marco


    Key4ce - ICT professionals: www.key4ce.com