More in this section

Forums / Developing with Sitefinity / Best practice to provide user custom menu

Best practice to provide user custom menu

7 posts, 0 answered
  1. Drew Reutlinger
    Drew Reutlinger avatar
    17 posts
    Registered:
    25 Sep 2009
    22 Mar 2010
    Link to this post
    I am looking for a solution to allow the user to drag a menu control on a page and be able to populate that menu with custom links. What is the best practice to allow this feature?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    22 Mar 2010
    Link to this post
    Hi Drew Reutlinger,

    You can take a look at this blog post - SiteMenu builder

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    20 Apr 2010
    Link to this post

    Is it possible to get a little bit further clarification on the SiteMenu Builder ?

     


    For instance - Do I:
    Put the code for DynamicMenuBuilderWebUITypeEditor.cs in the App_Code folder?
    Create the control called
    PageIDWebEditor ?
    Create a class called  DynamicMenuBuilder  ?? To put where???

     

    I guess I am confused because there isn’t any namespace reference used? Is this to be compiled somehow?


    Thank you.

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    20 Apr 2010
    Link to this post
    Hello Laura,

    You can put the classes - DynamicMenuBuilderWebUITypeEditor and DynamicMenuBuilder in App_Code folder. The namespace does not matter in this case. You can add it if you want. PageIDWebEditor is a template for the WebEditor.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    20 Apr 2010
    Link to this post
    Thank you.  Almost there. I am all good until I hit the Select button in the Properties tab.  I am getting the error below. I have tried many things and received other errors but in the end I keep coming back to this below. Note: I do have the class in the App_Code/CSCode/ folder which I have mapped to in the webconfig.
    <compilation debug="true">
           <codeSubDirectories>
              <add directoryName="CSCode" />
           </codeSubDirectories>
       </compilation>

    ----------
    Could not find a type for a name.  The type name was 'CSCode.DynamicMenuBuilderWebUITypeEditor, App_Code'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: Could not find a type for a name.  The type name was 'CSCode.DynamicMenuBuilderWebUITypeEditor, App_Code'.
    ----------
    How does this class get called/used?  public class DynamicMenuBuilder : CompositeControl
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    20 Apr 2010
    Link to this post
    Hello Laura,

    You do not have to map the folders in App_Code. You can just copy/paste from the blog post and the control should work. DynamicMenuBuilder is the main class, DynamicMenuBuilderWebUITypeEditor is the supported web editor.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    20 Apr 2010
    Link to this post
    The reason I had to map is because I have another class in there that someone else supplied that is VB.
    Can I not have the classes DynamicMenuBuilderWebUITypeEditor and DynamicMenuBuilder in a sub folder? Or do I have to convert to VB and place in the App_Code folder directly?
Register for webinar
7 posts, 0 answered