Help sorting news articles

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
numero7
New Member
New Member
Posts: 8
Joined: Mon Jul 16, 2012 3:43 pm

Help sorting news articles

Post by numero7 »

my configuration
Cms Version: 1.10.3 - phpversion: 5.2.17
----------------------------------------

Hi first thanks for this help/share forum, I'm new here and also in CMSMS and I really appreciate all this help source here.

Maybe my question is not in the right topic, so feel free to move it if needed :-)

I have a beginner question,
I want to order the news article feed on my page and I've seen that you can order the news summary by ascending order like the code below :

Code: Select all

{news number='4' lang='fr_FR' category='FR' moretext='INFORMATIONS' detailtemplate='biens-immobiliers-verbier' detailpage='vente' sortasc='true'}
I have a field "price" in my news article and I need to sort the news by this field (from lower to higher price).
Is it possible to do it by code or shortcode ?

Hope you will understand my question. Thank you very much
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Help sorting news articles

Post by applejack »

The short answer is no you can't as the news sort is based upon date. You may be able to code this somehow in the news template but sorting by price can be tricky as 21 will sort higher than say 111. Why are you using prices for the news you may be better looking at the products module.
numero7
New Member
New Member
Posts: 8
Joined: Mon Jul 16, 2012 3:43 pm

Re: Help sorting news articles

Post by numero7 »

oh yes thanks for your advice, I will look at the product module.
regards
Post Reply

Return to “CMSMS Core”