Clicking organizeparts does nothing

Topics: Developer Forum
Sep 6, 2008 at 5:34 PM
My content item is so
<N2.Details.WithEditableTitle("Title", 0)> _
Public Class BasePage
    Inherits N2.ContentItem
    Public Overrides ReadOnly Property TemplateUrl() As String
        Get
            Return "~/Themes/ChubNelson/N2/Home.aspx"
        End Get
    End Property
End Class
<N2.Definition("FullColumn")> _
<N2.Integrity.AvailableZone(myGlobals.Main, myGlobals.Main)> _
Public Class FullColumnPage
    Inherits BasePage
    Public Overrides ReadOnly Property TemplateUrl() As String
        Get
            'Return "~/Default2.aspx"
            Return "~/Themes/ChubNelson/N2/FullColumn.aspx"
        End Get
    End Property
End Class

The FullColumn.aspx looks like...

Partial Class Themes_N2_FullColumn
    Inherits CommunityServer.Components.CSPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


    End Sub
End Class
<asp:Content ID="Content8" ContentPlaceHolderID="bcr" Runat="Server">
    <n2:DroppableZone runat="server" ZoneName="Main" />
</asp:Content>

The ContentItem im trying to add looks like...
<N2.Details.WithEditableTitle("Title", 0)> _
Public Class BaseItem
    Inherits N2.ContentItem
    Public Overrides ReadOnly Property IsPage() As Boolean
        Get
            Return False
        End Get
    End Property
End Class
<N2.Definition("Content", "Content")> _
<AllowedZones(New String() {myGlobals.Left, _
                            myGlobals.LeftBottom, _
                            myGlobals.LeftTop, _
                            myGlobals.Right, _
                            myGlobals.RightTop, _
                            myGlobals.RightBottom, _
                            myGlobals.Main, _
                            myGlobals.MainTop, _
                            myGlobals.MainBottom})> _
Public Class Box1
    Inherits BaseItem
End Class

Any help is appreciated.
Coordinator
Sep 6, 2008 at 5:57 PM
It's probably this. You can either download the source from svn or wait a bit until a new release.
Sep 6, 2008 at 7:34 PM
I could not find a solution to my problem in there. Can you help me out?

My other pages allow me to "organize".


Coordinator
Sep 6, 2008 at 8:37 PM
Hmm,
  • since you can click organize parts I assume your master page master page containa a <n2:DragDropControlPanel
  • when you click edit=drag is appended to the query string
  • if you look at the form tag of FullColumn.aspx, does the action attribute doesn't say anything like "....aspx?id=123+++++++++++++"?
Sep 7, 2008 at 3:27 AM
since you can click organize parts I assume your master page master page containa a <n2:DragDropControlPanel?

Yes it does...

when you click edit=drag is appended to the query string

Yes...

if you look at the form tag of FullColumn.aspx, does the action attribute doesn't say anything like "....aspx?id=123+++++++++++++"?


FullColumn.aspx?page=49&edit=drag++++++++++++++++++++++++++++++++++++++++



The item I'm trying to add to the page is allowed to do so...   let me verify with you here...

FullColumn.aspx

<n2:DroppableZone ID="DroppableZone1" runat="server" ZoneName="Main" />

Content
Public Class myGlobals
    Public Const Right As String = "Right"
    Public Const RightTop As String = "RightTop"
    Public Const RightBottom As String = "RightBottom"
    Public Const Left As String = "Left"
    Public Const LeftTop As String = "LeftTop"
    Public Const LeftBottom As String = "LeftBottom"
    Public Const Main As String = "Main"
    Public Const MainBottom As String = "MainBottom"
    Public Const MainTop As String = "MainTop"
End Class
<N2.Definition("Content", "Content")> _
<AllowedZones(New String() {myGlobals.Left, _
                            myGlobals.LeftBottom, _
                            myGlobals.LeftTop, _
                            myGlobals.Right, _
                            myGlobals.RightTop, _
                            myGlobals.RightBottom, _
                            myGlobals.Main, _
                            myGlobals.MainTop, _
                            myGlobals.MainBottom})> _
Public Class Box1
    Inherits BaseItem

    Public Overrides ReadOnly Property TemplateUrl() As String
        Get
            Return "~/N2/Items/Box1.ascx"
        End Get
    End Property

    <N2.Details.EditableTextBox("Body", 0)> _
    Public Property Body() As String
        Get
            Return MyBase.GetDetail("Body")
        End Get
        Set(ByVal value As String)
            MyBase.SetDetail(Of String)("Body", value, "")
        End Set
    End Property

End Class

FullColumn ContentItem

<N2.Definition("FullColumn")> _
<N2.Integrity.AvailableZone(myGlobals.Main, myGlobals.Main)> _
Public Class FullColumnPage
    Inherits BasePage
    Public Overrides ReadOnly Property TemplateUrl() As String
        Get
            'Return "~/Default2.aspx"
            Return "~/FullColumn.aspx"
        End Get
    End Property
End Class
Sep 7, 2008 at 5:27 AM
Interesting behavior.

When I change the templateurl to ~/default.aspx (same as my start page, which works fine), FullColumn begins to work (although using the wrong templateurl).

So the problem must be in the page.

Should I post the source for each page?
Coordinator
Sep 7, 2008 at 10:10 AM
Try with a newer version of n2.dll and see if that helps.
Sep 7, 2008 at 2:43 PM
That worked!

When is an official release coming?
Coordinator
Sep 7, 2008 at 8:35 PM
Any day now =)
Sep 7, 2008 at 11:14 PM
Thanks!!

It's also solution to my problem. I don't have to add &hi=world any time I want to organize my pages.

Way to go libardo!
Sep 13, 2008 at 2:11 PM
Edited Sep 13, 2008 at 3:30 PM
Is there an rss feed somewhere that I can subscribe to? I would like to be notified when the new release is coming out.

I have a project I would like to build on top of N2CMS but I want to wait till the new release.

I've been trying to build my app but you can keep moving things! For the better though. I saw that you eliminated that unneeded N2.Templates assembly. Good idea.
Coordinator
Sep 14, 2008 at 8:51 PM
I just released. There's an rss feed on top of this page, on the right hand side.
Nov 29, 2008 at 4:46 PM
It just happened again. I'm posting a fix to MultipleHostsUrlParser.BuildUrl(..) ignores site path and assumes it to be root