Tutorial

At some point you will likely use and work with the Dolphin 7 Page Blocks / Page Builder. You will quickly find that pages are not really sorted in any particular order. Although this is not a big issue, it can make it a bit more time-consuming and tedious to find the page you are looking for.

If you would like to make the pages easier to find and work with in the Page Builder you can do so by sorting the order in which they appear.

The easiest would be to sort by Ascending order, which is along the lines of alphabetical. You could also sort by Descending order, which is more like reverse alphabetical order. Either method can make things easier for you to work with.

The simple method of sorting the order is to just edit and change one .php file. Alternatively you could make modifications to your Dolphin 7 database, but I prefer to avoid editing the database when possible.

So in this case we will make a simple code change to the one .php file.

At the time this Boonex Dolphin 7 Tutorial was posted the current version is: Dolphin 7.0.8


Download and backup this file just in case:
/inc/classes/BxDolPageViewAdmin.php

Then open /inc/classes/BxDolPageViewAdmin.php with your favorite editor.


Dolphin 7 How to sort the Page Builder Alphabetically - (Ascending)


Find:

function getPages() {
$sPagesQuery = "SELECT `Name`, `Title` FROM `{$this -> sDBTable}_pages` ORDER BY `Order`";

$rPages = db_res( $sPagesQuery );
while( $aPage = mysql_fetch_assoc($rPages) ) {
$this -> aPages[] = $aPage['Name'];
$this -> aTitles[$aPage['Name']] = $aPage['Title'];
}
}



Change to:


function getPages() {
$sPagesQuery = "SELECT `Name`, `Title` FROM `{$this -> sDBTable}_pages` ORDER BY `Title` ASC";

$rPages = db_res( $sPagesQuery );
while( $aPage = mysql_fetch_assoc($rPages) ) {
$this -> aPages[] = $aPage['Name'];
$this -> aTitles[$aPage['Name']] = $aPage['Title'];
}
}



Save the changes back to your hosting account. Then, return to the Dolphin 7 Administration Page Blocks / Pagebuilder to verify the changes you made.

This will make the Page Blocks / Pagebuilder display in alphabetical order.

You are basically just adding ASC or Ascending order.


Original/Before:

Page Builder Original



Modified/After:

Page Builder Ascending



Dolphin 7 How to sort the Page Builder Reverse Alphabetically - (Descending)


If for some reason you would like the order totally reversed ie descending - reverse alphabetical order then you can apply the following...

Find the same code:

function getPages() {
$sPagesQuery = "SELECT `Name`, `Title` FROM `{$this -> sDBTable}_pages` ORDER BY `Order`";

$rPages = db_res( $sPagesQuery );
while( $aPage = mysql_fetch_assoc($rPages) ) {
$this -> aPages[] = $aPage['Name'];
$this -> aTitles[$aPage['Name']] = $aPage['Title'];
}
}



Change to:

function getPages() {
$sPagesQuery = "SELECT `Name`, `Title` FROM `{$this -> sDBTable}_pages` ORDER BY `Title` DESC";

$rPages = db_res( $sPagesQuery );
while( $aPage = mysql_fetch_assoc($rPages) ) {
$this -> aPages[] = $aPage['Name'];
$this -> aTitles[$aPage['Name']] = $aPage['Title'];
}
}



Save the changes back to your hosting account. Then, return to the Dolphin 7 Administration Page Blocks / Pagebuilder to verify the changes you made.

This will make the Page Blocks / Pagebuilder display in reverse alphabetical order.

You are basically just adding DESC or Descending order.


Original/Before:

Page Builder Original



Modified/After:

Page Builder Descending




Note:
If Boonex decides to make changes to /inc/classes/BxDolPageViewAdmin.php in future upgrades you would need to re-apply this modification. But, as you can see this is very easy and only takes a few moments if that happens to be the case.



Credit:
This Dolphin Tutorial is partially based upon a Boonex Forum post found here:
in the page builder in admin panel pages are not alphabetical


By:
Steve The Exploiter

I am not exactly sure what the member name Steve The Exploiter is about, but the post was decent. Part of this tutorial is based upon the particular post along with a few more options, details and screen shot examples I added.

 
Written By
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Sponsored Links
Recommend