Developer forum

Forum » Swift » Rename a page in Swift

Rename a page in Swift

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

What happened to the option to rename a page? Looks like some item type configuration makes the title field readonly:

 

I found this code in PageEdit but not sure why that is used and what the alternative to renaming it here is.

If Not String.IsNullOrEmpty(p.MenuText) AndAlso Not String.IsNullOrEmpty(p.ItemType) Then
    Dim itemType As ItemType = Content.Items.Metadata.MetadataManager.Current.GetItemType(p.ItemType)
    If Not IsNothing(itemType) Then
        If Not String.IsNullOrEmpty(itemType.Title) OrElse Not String.IsNullOrEmpty(itemType.FieldForTitle) Then
            PageMenuText.Disabled = True
        End If
    End If
End If

Any pointers?

Imar


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply
This post has been marked as an answer

Hi Imar,

It's probably because of the ItemType.
Go to the normal Page view (not the properties) and switch between Paragraphs and ItemType. And there you should have a Title field:



Adrian

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Ah, yes, that makes sense now. Thanks!

Imar

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Not sure it makes sense, but it is how it was developed... :-)

 

You must be logged in to post in the forum