Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 48215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:14:42+00:00 2026-05-10T16:14:42+00:00

I have a tree representation of pages in a CMS application. I understand how

  • 0

I have a tree representation of pages in a CMS application. I understand how to persist the tree in the database. However, I don’t have a good way to:

A) Reorder subpages under a particular parent page.
B) Provide a UI implementation that allows the user to change the order.

Any suggestions?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:14:43+00:00Added an answer on May 10, 2026 at 4:14 pm

    Changing the order itself will require you store some sort of ordering along with each page in the database. Just the current highest / lowest value +/- 1 would probably be a fine starting point. Once you’ve got that ordering in there, reordering becomes a case of swapping two values or changing the value for one page to be between two others (you could use floats I guess, but you may need to renumber if you split it too many times).

    Anyway, once you’ve got that, you need a UI. I’ve seen a very simple ‘swap this with the one above/below’ approach which can be a simple web link or an AJAX call. You could also present all the page values to the user and ask them to renumber them as they see fit. If you want to get fancy, JavaScript drag and drop might be a good approach. I’ve used ExtJS and Mootools as frameworks in this kind of area. If you don’t need all the Extjs widgets, I’d say well away from it in future, and look at something like the Mootools Dynamic Sortables demo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about the recommended way to map a conversation tree to
Here is the problem: I have a representation of a tree. let's abstract this
I have been trying to implement a tree representation of Autosys job schedules at
I have tree like following example, where every leaf is object. [1] |--[2] |
I have a tree(jstree) inside a div, so when a node gets expanded the
I have a tree in which i want the onOpen and onClose to be
I have a tree walker like this: function: ^(FUNCTION_TOK fcname=IDENTIFIER param=functionParameters*){ a_param_arrayList.add(param); } ;
I have a tree table with two columns on a page. The first one
I have a tree of divs: <div id=a onclick=func> <div id=b onclick=func> <div id=c
I have an own Tree object implemented in PHP. Say we have a tree

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.