Selection vs Sorting in Article loop

I have a slight dilemma with an article loop where I want to display the ten newest articles but sorting the results by title.

I can do {par date}{inverse}{0,10) or {par titre}{0,10} but can't get any combination of the two to work. Is this possible?

Cheers,
Paul

I think you should precise from which section (rubrique) you want the loop
to get the articles list from. You can try {racine}{tout} or to precise a
particular section for example

You should try this for a list of the ten latest articles (with a link to
them) of section 1 for example:

<BOUCLE_news(ARTICLES){id_rubrique=1}{par date}{inverse}{0,10}>

[<a href="#URL_ARTICLE">(#TITRE|SUPPRIMER_NUMERO)</a><BR>]

</BOUCLE_news>

Regards,

Emmanuel VIVIER
Managing Director & Co-Founder
--------------------------------------------
Phone: + (352) 021 472 610 (direct line)
Phone: + (352) 265 308 68
E-mail: emmanuel.vivier@creadrive.com
Web: http://www.creadrive.com
--------------------------------------------
Creadrive | Web Design, Marketing & Technologies Experts

-----Message d'origine-----
De : spip-en-bounces@rezo.net [mailto:spip-en-bounces@rezo.net] De la part
de Paul Knight
Envoyé : mercredi 5 mai 2004 00:43
À : spip-en@rezo.net
Objet : [Spip-en] Selection vs Sorting in Article loop

I have a slight dilemma with an article loop where I want to display the
ten newest articles but sorting the results by title.

I can do {par date}{inverse}{0,10) or {par titre}{0,10} but can't get
any combination of the two to work. Is this possible?

Cheers,
Paul
_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Hi Emmanuel,

Sorry, I should have given a full example. My loop is similar to the example that you've quoted but the results for that would be in date order. What I'd like to do it sort the results by title, yet still select the 10 newest articles.

Something like this:

<BOUCLE_news(ARTICLES){id_rubrique=1}{par date}{inverse}{0,10}{par titre}>

Cheers,
Paul

Emmanuel Vivier wrote:

I think you should precise from which section (rubrique) you want the loop
to get the articles list from. You can try {racine}{tout} or to precise a
particular section for example

You should try this for a list of the ten latest articles (with a link to
them) of section 1 for example:

<BOUCLE_news(ARTICLES){id_rubrique=1}{par date}{inverse}{0,10}>

[<a href="#URL_ARTICLE">(#TITRE|SUPPRIMER_NUMERO)</a><BR>]

</BOUCLE_news>

Regards,
Emmanuel VIVIER
Managing Director & Co-Founder
--------------------------------------------
Phone: + (352) 021 472 610 (direct line)
Phone: + (352) 265 308 68
E-mail: emmanuel.vivier@creadrive.com
Web: http://www.creadrive.com
--------------------------------------------
Creadrive | Web Design, Marketing & Technologies Experts

-----Message d'origine-----
De : spip-en-bounces@rezo.net [mailto:spip-en-bounces@rezo.net] De la part
de Paul Knight
Envoyé : mercredi 5 mai 2004 00:43
À : spip-en@rezo.net
Objet : [Spip-en] Selection vs Sorting in Article loop

I have a slight dilemma with an article loop where I want to display the ten newest articles but sorting the results by title.

I can do {par date}{inverse}{0,10) or {par titre}{0,10} but can't get any combination of the two to work. Is this possible?

Cheers,
Paul
_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Hi there

you can't use more than one sort order in a loop. Only thing i could think of would be make a loop with the 10 newest articles check the age of the last one and then call a loop with that sorted by title and age less or equal that date. Should work but couldn't win any "good scripting" price :smiley:

hope that helps
Christoph

Paul Knight wrote:

Hi Emmanuel,

Sorry, I should have given a full example. My loop is similar to the example that you've quoted but the results for that would be in date order. What I'd like to do it sort the results by title, yet still select the 10 newest articles.

Something like this:

<BOUCLE_news(ARTICLES){id_rubrique=1}{par date}{inverse}{0,10}{par titre}>

Cheers,
Paul

Emmanuel Vivier wrote:

I think you should precise from which section (rubrique) you want the loop
to get the articles list from. You can try {racine}{tout} or to precise a
particular section for example

You should try this for a list of the ten latest articles (with a link to
them) of section 1 for example:

<BOUCLE_news(ARTICLES){id_rubrique=1}{par date}{inverse}{0,10}>

[<a href="#URL_ARTICLE">(#TITRE|SUPPRIMER_NUMERO)</a><BR>]

</BOUCLE_news>

Regards,
Emmanuel VIVIER
Managing Director & Co-Founder
--------------------------------------------
Phone: + (352) 021 472 610 (direct line)
Phone: + (352) 265 308 68
E-mail: emmanuel.vivier@creadrive.com
Web: http://www.creadrive.com
--------------------------------------------
Creadrive | Web Design, Marketing & Technologies Experts

-----Message d'origine-----
De : spip-en-bounces@rezo.net [mailto:spip-en-bounces@rezo.net] De la part
de Paul Knight
Envoyé : mercredi 5 mai 2004 00:43
À : spip-en@rezo.net
Objet : [Spip-en] Selection vs Sorting in Article loop

I have a slight dilemma with an article loop where I want to display the ten newest articles but sorting the results by title.

I can do {par date}{inverse}{0,10) or {par titre}{0,10} but can't get any combination of the two to work. Is this possible?

Cheers,
Paul
_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Greetings,

1) how do I disable all forums in all the site?
2) I have created a "NEWS" section. I want contributors to add news
   only there, never in any other section. How can I enforce that?

TIA,

Marco Fioretti

--
Marco Fioretti m.fioretti, at the server inwind.it
Red Hat for low memory http://www.rule-project.org/en/

Nature is very un-American. Nature never hurries.
            -- William George Jordan

M. Fioretti wrote:

Greetings,

1) how do I disable all forums in all the site?

Click on "Site administration" then on "Interactivity" and check "*Disable the use of public forums. Public forums could be allowed on a case by case basis for the articles; they will be forbidden for the sections, news, etc. ."

George
*