Jump to content

Recommended Posts

Is it possible to change the sort order of existing pages created using define content?

I can see that they all get an ID number code but cannot find a way to edit this.

Would appreciate any advice or information.

Sam

Share this post


Link to post
Share on other sites

Easy way is to create the pages and then put the information you want first on the one that is appearing first and so on.

 

More difficult add a sort order field to the record and amend the sql to sort the pages.

 

you don't mention which pages or where so difficult to help.

 

Cheers

 

G


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites

Hiya,

Thanks for replying.

I have used the define content add-on to build the static information pages for the web site - they are then shown in the 'information' box in the right hand column (www.torcjewellery.com).

I wanted to show these pages in alphabetical order but I can't find an easy solution.

My only thought is to re-create the pages in alpha order...

 

I'd love to know if there is a better idea.

 

Thanks, Sam

Share this post


Link to post
Share on other sites

Real quick Easy answer if you don't mind it being HARDCODED, this is a quick fix for what you want:

	  	if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
      		$content_query = tep_db_query("select page_title, page_url from `define_content` where status='yes' order by  id");
      	  } else {
      	  	$content_query = tep_db_query("select page_title, page_url from `define_content` where status='yes' and login_view='no' order by id");
      	  }

Line 35 to 39 in file /catalog/includes/modules/boxes/bm_information  you are going to change the following:

 

order by id

to

order by page_title ASC

 

There are 2 places for this and it will put your information box in order by page title from A-Z

 

Hope this helps,

Shawn Mulligan

 

P.S.  This is based off of the define_content for OSC 2.3 and off of the file in the original package.

Share this post


Link to post
Share on other sites

Hi Shawn,

 

Brilliant fix - I have messed about with this for hours!

Should have asked the question sooner...

 

Many thanks,       Sam

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×