The goal of this feature is to remove confusion between a page "move" and a change to the page "title". Some versions back, these two were separated, leaving the possibility of having the page title different from the URI. While this allows for controlling the order that pages appear in the nav bar, it also creates (in my experience) significant user confusion. It has also caused scripted templates to break, when the scripts don't adequately account for the various cases when title != name.
This feature is intended for content authors in MindTouch, and this work will be available to all versions starting with Olympic.
For the sake of clarify, some basic verbage will be defined:
Currently, upon page creation, the display title and the URL title are both set based on the title from the editor. On edits of pages, the editor title becomes the way to edit the display title while the move dialog becomes the mechanism to edit the page title. Clearing out the display title and re-synchronizing the two requires deleting the title form the editor.
(See related talk page.)
To begin with, we need answer a few essential questions: Why do we need separation of title and path? What function does it provide?
(Note that case #3 will go by the wayside with a page ordering solution that is independent of the page path. Therefore, case #3 should not play a defining role in our analysis.)
Scoping by neilw, RoyK. To be a part of the Olympic release.
When a user creates a new page, the user sets a title, which is utilized for both the display as well as the URI title.
This is the most common use case. A contributor wishes to update a page's title to reflect more accurately the content of a page. The contributor conceptually understands display titles and URI titles are linked, and wishes to make a change to both. The contributor will go to edit the title, then save the changes - the path of least resistance in this workflow should end up with both of them changed.
Choosing the option of keeping the page title in sync will cause all sub-pages to move as well. (Being a move operation, this feature should be less discoverable.)
This operation is less common. Here, the user wishes the page title to be different from the URI with the express purpose of controlling the order of the pages in the nav bar, or for creating a simpler URL structure. This use case will also be triggered if a user is attempting to create a page with an underscore (not common); currently due to the way front-end titles are handled, the underscore will be converted into a space.
In order to do this, the user will go to the same title editing experience, but will conceptually "unlink" the page display title and URI title so edit them independently and save.
Validation occurs on the URI title to prevent restricted URI characters as well as conflicting title names. Display titles will never throw an error (except in the case an empty string is set).
This operation moves the page outside of the existing hierarchy to a new location. This operation should not allow for a display title or URL title change. (This is not a common operation - in most OSes, moving files and changing the file names are different operations).
The move dialog should only allow for the page's parent path to be set.
| The default title view as it is today. | ![]() |
| Hovering over the title indicates an editable field. | ![]() |
| Clicking dynamically loads the edit experience. Iconography indicates that the display title as well as the URL title are "linked" - updating the title will also update the URL. | ![]() |
| Clicking the linked icon exposes a field to set the the URL title of the page. For truncation's sake, if parents or children exist, they will be truncated to ellipsis. | ![]() |
| Error states for both the linked/unlinked views. Note that in the unlinked view, the field that the error state triggers is highlighted. In the case of the unlinked, since there's only one input, no focus needs to be made. |
|
A page has a linked URI title and page title upon creation. When linked, the UI allows one field for changing both the URI title and the page title. The user may choose to unlink the URI title and page title and is given separate fields to do so.
In the case of using ONLY the "to" parameter, the linked state of the page determines the URI title:
| Table | Column | Type | Values |
|---|---|---|---|
| pages | page_name_type | TINYINT(1) | 0 = Default (Linked) 1 = Fixed (Page cannot be moved) 2 = Custom (Unlinked) |
Goals: The update script will add the linked column and populate the display title and linked column with data.
<page id="22" href="http://www/@api/deki/pages/22?redirects=0">
<uri.ui>http://www/</uri.ui>
<title>MindTouch Page</title>
<path type="custom">Foo/Bar/Baz</path
<namespace>main</namespace>
</page>
Title handling on the contents API needs to be changed. Display titles can no longer be "reset" and thus the preservetitle parameter becomes worthless. Additionally, in the absence of the title parameter, no change to the display title should occur.
| Name | Type | Old functionality | New functionality |
|---|---|---|---|
| preservetitle | bool? | keep existing display title (default: false) | NOOP |
| title | string? | the display title (default: determine title from page path) | set the display title (default: NOOP) |
| Name | Type | Description |
| authenticate | bool? | Force authentication for request (default: false) |
| redirects | int? | If zero, do not follow page redirects. |
| to | string? | new page path (absolute) |
| parentid | int? | integer page ID of new parent page |
| title | string? | new page title* |
| name | string? | new page path segment** |
Below is the expected behavior of the new query parameters for the move API. Each parameter has the expected final naming and functionality detailed below.
| Name | Behavior |
|---|---|
| to | affects only path/name but not title. if page is linked, final segment overriden by display title. if page is unlinked, path unchanged |
| parentId | if omitted, current page parent is used |
| title | if omitted, current page title is used |
| name | if omitted, derived from current page title |
| Title | Name | Status |
|---|---|---|
| foo | (omitted) | Linked |
| (omitted) | foo [existing title != foo] | Custom |
| (omitted) | foo [existing title == foo] | Linked |
| foo | foo | Linked |
| foo | bar | Custom |
Note: "to" is not included here because the final path is dependent on the linked state of the page. All special cases will be illustrated below.
| to | parentId | title | name | Expected Result | |
|---|---|---|---|---|---|
| 1 | x | Page (final segment in URI parameter) moved to absolute path given in 'to' query parameter. Title is unaffected. | |||
| 2 | x | x | Bad Request | ||
| 3 | x | x | Page moved to absolute path and title is set. The last segment in the path is set to the value of title. The title is king. ALL HAIL THE DISPLAY TITLE! | ||
| 4 | x | x | Bad Request | ||
| (empty) | Bad Request | ||||
| (empty) | Bad Request | ||||
| (empty) | Bad Request | ||||
| 5 | pageId | Page moved to different parent. Title & name unaffected. | |||
| 6 | pageId? | segment | Valid name required**; path/@type: custom (unless segment == existing title -> linked) | ||
| 7 | pageId? | string | Valid display title required*; path/@type: linked | ||
| 8 | pageId? | string | segment | Set a display title* & path segment**; path/@type: custom (unless segment == title -> linked) |
*Display title handling
**Name handling
***Title to name conversion
The following is a list of cases illustrating the actual and desired behaviors of combinations and inputs of the new and existing move query parameters. Note that in the provided examples encodings are not used for readability. Paths and parameter values are enclosed in curly brackets {}.
| Case | Parameter(s) | Result |
| 0a | to=path (linked) | Page (final segment in URI parameter) moved to absolute path given in 'to' query parameter. If the page is linked prior to the move request, URI title in the 'to' path overwrites the display title. |
| 0b | to=path (unlinked) | Page (final segment in URI parameter) moved to absolute path given in 'to' query parameter. If the page is unlinked prior to the move request, display title remains unchanged. |
| 1a | to=path + name=path, parentid=pageid, | Combination of name/parentid parameters with 'to' returns Bad Request |
| 1b | to=path, title=string | Page moved to absolute path given in 'to' query parameter and title is set to value given in the 'title' query parameter. The URI title is assigned the 'title' value as well and forces the page to a "linked" state. |
| 2 | name=path | URI title assigned value given in 'name' query parameter |
| 3 | parentid=pageid | Page moved to child of 'pageid' |
| 4 | title=string | Page title is assigned the 'title' value. URI title is assigned the 'title' value as well and forces the page to a "linked" state. |
| 5 | name=path, parentid=pageid | URI title assigned value given in 'name' query parameter and moved to child of 'pageid'. Display title remains unchanged. |
| 6 | name=path, title=string | URI title assigned value given in 'name' query parameter, and the display title is assigned the 'title' value |
| 7 | parentid=pageid, title=string | Page moved to child of 'pageid' and title is assigned the 'title' value. URI title is assigned the 'title' value as well and forces the page to a "linked" state. |
| 8 | name=path, parentid=pageid, title=string | Page renamed to path given in 'name' query parameter, page moved to child of 'pageid', and page title is assigned the 'title' value |
| 9 | name=, parentid=, title= | Empty parameters return Bad Request |
The 'to' parameter takes in a path as input. The new page path is absolute, i.e. relative to root.
The URI title overwrites the display title.
Old location: /foo/bar/123 -- Title: 123 -- (linked)
POST:pages/={foo/bar/123}/move?to={oof/rab/321}
New location: /oof/rab/321 -- Title: 321 -- (linked)
The 'to' parameter takes in a path as input. The new page path is absolute, i.e. relative to root.
No change is made to the display title.
Old location: /foo/bar/123 -- Title: snafu -- (unlinked)
POST:pages/={foo/bar/123}/move?to={oof/rab/321}
New location: /oof/rab/321 -- Title: snafu -- (unlinked)
'to' cannot be used with the name/parentid parameters. Results in Bad Request.
The page is moved to the path given in 'to'. The title is set to the 'title' value.
If the URI title == display title, the page is linked. Otherwise it is unlinked
Old location: /foo/bar/123 -- Title: abcd
POST:pages/={foo/bar/123}/move?to={oof/rab/321}&title=efgh
New location: /oof/rab/321 -- Title: efgh -- (unlinked)
Old location: /foo/bar/123 -- Title: abcd
POST:pages/={foo/bar/123}/move?to={oof/rab/321}&title=321
New location: /oof/rab/321 -- Title: 321 -- (linked)
The 'name' parameter takes in a string value. The new page path is relative to the final segment in the path.
Passing a name different than the existing title will result in the page being in an "unlinked" state. Otherwise, it is "linked".
Old location: /foo/bar/123 -- Title: 123 -- (linked)
POST:pages/={foo/bar/123}/move?name=new
New location: /foo/bar/new -- Title: 123 -- (unlinked)
Old location: /foo/bar/new -- Title: 123 -- (unlinked)
POST:pages/={foo/bar/123}/move?name=123
New location: /foo/bar/123 -- Title: 123 -- (linked)
The 'parentid' parameter takes in an integer page ID as input. The moved page becomes a child of the page with the specified ID.
Old Location 1: /foo/bar/123 (page ID = 456)
Old Location 2: /oof/rab/321 (page ID = 789)
POST:pages/={foo/bar/123}/move?parentid=789
New Location 1: /foo/bar
New Location 2: /oof/rab/321/123
The 'title' parameter takes in a string as input. The page title is set to the 'title' value and the URI title is reset to the title value given.
Passing only a title forces the page into a "linked" state.
Old: /foo/bar/123 -- Title: Hello, World! -- (unlinked)
POST:pages/={foo/bar/123}/move?title={Goodbye, Cruel World!}
New: /foo/bar/{Goodbye, Cruel World!} -- Title: Goodbye, Cruel World! -- (linked)
Moves the final segment of the old path to the path given in the name parameter as a child of the page given in the parentpageid parameter.
Passing a name different than the existing title will result in the page being in an "unlinked" state. Otherwise, it is "linked". See case 2 above.
Old Location 1: /foo/bar/123 Title: Blah
Old Location 2: /xxx (page ID = 777)
POST:pages/={foo/bar/123}/move?name=baz&parentid=777
New Location 1: /foo/bar
New Location 2: /xxx/baz Title: Blah
Renames the final segment of the old path to the name given in the 'name' parameter and the title is changed to that in the 'title'.
If name == title, the page's state will be set to linked. Otherwise it will be unlinked. See case 2 above.
Old Location: /foo/bar/123 -- Title: abcdefg -- (unlinked)
POST:pages/={foo/bar/123}/move?name=456789&title=hijklmno
New Location: /foo/bar/456789 -- Title: hijklmno -- (unlinked)
Move the page (and all subchildren) to child of page with pageid given in the 'parentid' parameter. The page title is changed to the value given in the 'title' parameter. The page title is set to the 'title' value and the URI title is reset to the title value given.
Passing a title and not a name forces the page into a "linked" state.
Old Location 1: /foo/bar/123 -- Title: abcdefg -- (unlinked)
Old Location 2: /oof/rab/321 (Page ID = 12345)
POST:pages/={foo/bar/123}/move?parentid=12345&title=pqrstuv
New Location 1: /foo/bar
New Location 2: /oof/rab/321/pqrstuv -- Title: pqrstuv -- (linked)
Moves page (and all subchildren) of final segment in the URI parameter to path "name" as a child of "parentid" with title "title".
If name == title, the page's state will be set to linked. Otherwise it will be unlinked. See case 2 above.
Old Location 1: /foo/bar/123 -- Title: rocknroll -- (unlinked)
Old Location 2: /oof/rab/321 (Page ID = 789)
POST:pages/={foo/bar/123}/move?name={new}&parentid=789&title=thisissparta
New Location 1: /foo/bar
New Location 2: /oof/rab/321/new -- Title: thisissparta -- (unlinked)
Any and all empty parameters should return a Bad Request.
The introduction of a linked attribute as well as path and title limitations require several more test cases to verify correctness.
| Case | Description |
| 10 | Linked tests: conditions for linking and unlinking. Also attribute inspection custom/fixed/none |
| 11 | Display title correctness (at least one character, whitespace trimming) |
| 12 | Name correctness (underscores, slashes, etc) |
| 13 | Display title to name conversion correctness |
| 14 | Miscellaneous - Correct aliasing, no page cycles, etc |
| File | Version | Size | Modified | |
|---|---|---|---|---|
| ||||
| ||||
| ||||
| ||||
| ||||
| ||||
| ||||
| ||||
| ||||
Copyright © 2011 MindTouch, Inc. Powered by
this would keep things consistent by keeping the title editing experience outside the editor. perhaps these two specs need to be implemented at the same time... edited 14:55, 3 Nov 2009
The disadvantage of having to pre-name the page is that, very often, I'm not really sure what I want the name to be until after I've entered some content. Of course, you can always start with a name, and then change it later, but I kind of like having the option of tweaking the name until the last second.
Nonetheless, I would *gladly* trade this for a solution to the problem original specified here.
As for the URI/title, I think that the old behaviour, whereby you edit the page title and the URL also changes, was superior (and afaict the only reason to change was sort order), so if the first point was implemented, we could return the second point, perhaps as Roy said about an in-place edit.
I wonder what the real experience of users is? I have found that they are generally confused by the current mode of operation, but that original spec suggests that they were confused by the old way too...
In my experience to most people the intuitive understanding of "rename" is to change the title of this doc but leave it right here, while "move" means take this doc from here and place it over there (and optionally change the title in the process).
I personally wouldn't want to have rename title be a separate action from edit and save (#3), unless perhaps it was vastly faster, but would still prefer that to the current process. edited 02:44, 20 Dec 2009
Is it possible to make this a global admin setting with per user over-ride preference ? Global admin setting that means when any user changes the title the uri also is changed to match.
Go for it! It'll be great to see this addressed somehow.
This is looking good, but I have a few questions:
1) Are you confident that most users will be able to find the "move page icon"? On a number of occasions, I've encountered users who don't know that you can mouse over the headings and edit only one section. They just always hit the "edit page" button. So, with the proposed UI, I'd expect some "how do I rename my page?" questions, for sure. Perhaps I'll poll my users and see what they really know.
2) When creating a new page, does it just work like it does now (<h1> element at the top of the editor)? Will it confuse users that sometimes the title appears in the editor and sometimes it doesn't? I really don't know, just wondering.
3) If I uncheck the box and set the page title to be different from the URL, how do I restore it to sanity? In the current UI, you delete the title in the editor and it reverts (this is very obscure and mysterious). Is there an obvious shortcut to "revert page title back to URL"?
4) Related to #3, If I've already diverged the title and URL, when I edit the title will the checkbox be checked by default or not? I'm not sure which way it should go, but you should specify what it's going to do.
5) My gut tells me that the "Update permalink" message should be generic, not showing the actual new URL. Most users don't have a clue about any of this to begin with; showing the URL presents visual noise that is distracting.
2.) no, the <h1> elements will disappear from all editor sections. the editor will just edit the contents of the page.
3.) not sure if this use case will be covered. they can simply rename the page with the checkbox on to return it to sanity. the "wipe to sanity" seems like an odd notion.
4.) the checkbox always remains checked, even in the case of divergence. this is to nudge display titles and URLs as aligned as possible. divergence seems to be an edge case, and more often than not it's the result of unexpected behavior.
5.) the only reason i'd keep the URL in the update permalink is because of use case #4. if we assume divergence is an edge case, there should be more sanity checks before big operations are undertaken. edited 16:27, 18 Mar 2010
> 2.) no, the <h1> elements will disappear from all editor sections. the editor will just edit the contents of the page.
So what happens when you create a new page?