Links Dropdown Customisation

Last post 02-27-2007, 10:33 AM by ClearChannel. 2 replies.
Sort Posts: Previous Next
  •  02-27-2007, 7:54 AM 26987

    Links Dropdown Customisation

    I am experiencing problems when trying to customise the links drop down to show the links as provided by the example on your website, but it seems to totally ignore the "if else" and still uses the links from the common.config file.

    This is the embeded editor code in add.aspx


    <CE:Editor Id="ContentTextBox" runat="server" Height="300px" Width="700px" RemoveServerNamesFromUrl="true" EditorWysiwygModeCss="~/css/editsuite_editor.css" ConfigurationPath="~/CuteSoft_Client/CuteEditor/Configuration/clearchannel.config" BackColor="#D4EAFF" BorderColor="#666666" CustomCulture="en" ThemeType="Office2003_BlueTheme" ></CE:Editor>

    This is the code in the page behind vb file which should rewrite the dropdown menu to show the 2 links below.
     
    If Not Page.IsPostBack Then
       If Not ContentTextBox.ToolControls("LinkTree") Is Nothing Then
       
    Dim tdd As CuteEditor.TreeDropDownList
       
    Dim richitem As CuteEditor.RichListItem
       tdd =
    DirectCast(ContentTextBox.ToolControls("LinkTree").Control, CuteEditor.TreeDropDownList)
       tdd.Items.Clear()
       
    Dim rootitem As CuteEditor.TreeListItem
       rootitem =
    New CuteEditor.TreeListItem("Root")
       rootitem.Selectable =
    False
       
    tdd.Items.Add(rootitem)
       rootitem.Items.Add(
    "Asp.Net", "Asp.Net", "http:'asp.net")
       rootitem.Items.Add(
    "DotNetNuke.Net", "DotNetNuke.Net", "http:'DotNetNuke.com")
       
    End If
    End If
  •  02-27-2007, 10:29 AM 26994 in reply to 26987

    Re: Links Dropdown Customisation

    ClearChannel,
     
    The above code works for me.
     
     

      If Not Page.IsPostBack Then    
       Dim tdd As CuteEditor.TreeDropDownList   
       tdd = DirectCast(Editor1.ToolControls("LinkTree").Control, CuteEditor.TreeDropDownList)
       tdd.Items.Clear()
          
       'Add items by code
       Dim rootitem As CuteEditor.TreeListItem
       rootitem=new CuteEditor.TreeListItem("Root")
       
       rootitem.Selectable=false
       tdd.Items.Add(rootitem)
       rootitem.Items.Add("Asp<font color=red>.Net</font>","Asp.Net","http:'asp.net")
       rootitem.Items.Add("DotNetNuke.Net","DotNetNuke.Net","http:'DotNetNuke.com")
       rootitem.Items.Add("CuteSoft","CuteSoft","http:'CuteSoft.net")
      End I
     
     
     
    Can you post the whole code?
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  02-27-2007, 10:33 AM 26995 in reply to 26994

    Re: Links Dropdown Customisation

    Here is the page_load function code...
     

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    doGlobal.checkLogin(Session("Access"), Application("logGeneral"))

    If Not Page.IsPostBack Then

    If Not ContentTextBox.ToolControls("LinkTree") Is Nothing Then

    Dim tdd As CuteEditor.TreeDropDownList

    Dim richitem As CuteEditor.RichListItem

    tdd = DirectCast(ContentTextBox.ToolControls("LinkTree").Control, CuteEditor.TreeDropDownList)

    tdd.Items.Clear()

    Dim rootitem As CuteEditor.TreeListItem

    rootitem = New CuteEditor.TreeListItem("Root")

    rootitem.Selectable = False

    tdd.Items.Add(rootitem)

    rootitem.Items.Add("Asp.Net", "Asp.Net", "http:'asp.net")

    rootitem.Items.Add("DotNetNuke.Net", "DotNetNuke.Net", "http:'DotNetNuke.com")

    End If

    End If

     
    Here is the embeded editor in the aspx file
     

    <div class="Row">

    <asp:Label ID="ContentLabel" runat="server" CssClass="FormLabel" Text="Content:"></asp:Label>

    <CE:Editor Id="ContentTextBox" runat="server" Height="300px" Width="700px" RemoveServerNamesFromUrl="true" EditorWysiwygModeCss="~/css/editsuite_editor.css" ConfigurationPath="~/CuteSoft_Client/CuteEditor/Configuration/clearchannel.config" BackColor="#D4EAFF" BorderColor="#666666" CustomCulture="en" ThemeType="Office2003_BlueTheme" ></CE:Editor>

    </div>

View as RSS news feed in XML