Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-15 11:58:28

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Sort order using a custom date field?

Im putting a “schedule” of events onto my TXP site. It’s gone well so far. Basically, any items i put in my “events” section are displayed on my events page as normal, but are also displayed on the schedule page. However, it only displays the event title (eg: Trinity vs Funkin Serious) and then the event date. Now this is not the date posted, but the date when the event takes place.

I always enter this into my “customfield_eventdate” field so it’s always a constant in that field.

Is there anyway i can get my “schedule page” to sort the events by the customfield event date? Preferably the soonest event at the top.

Any help would be great!! Cheers :)

Offline

#2 2007-03-15 12:18:04

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Sort order using a custom date field?

Sure if “customfield_eventdate” is the first custom field, then add this to the article tag: sort="custom_1 ASC" or sort="custom_1 DESC"

Last edited by ruud (2007-03-15 12:18:23)

Offline

#3 2007-03-15 12:22:43

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Sort order using a custom date field?

Ruud! Thanks for that, work’s like a charm!….

Now to test you, how can i highlight the first item in that list. Ideally, i want it to stand out, and marked up as “the next event is…” sort of thing?… But only the top item in the list?

Offline

#4 2007-03-15 12:27:08

axueer
New Member
Registered: 2007-03-15
Posts: 7

Re: Sort order using a custom date field?

Qwest ,Are you on line?Can you help me,please?

Offline

#5 2007-03-15 12:31:12

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Sort order using a custom date field?

axueer… What’s the prob?

Offline

#6 2007-03-15 12:35:11

axueer
New Member
Registered: 2007-03-15
Posts: 7

Re: Sort order using a custom date field?

I dont know.I from China.My English is not good.I can use English a little.

Offline

#7 2007-03-15 12:37:22

axueer
New Member
Registered: 2007-03-15
Posts: 7

Re: Sort order using a custom date field?

Sorry,please see the post

http://forum.textpattern.com/viewtopic.php?id=21649

Sorry myEnglish is so bad,can you understand?

Offline

#8 2007-03-15 12:39:13

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Sort order using a custom date field?

What is the problem?.. What do you need help with?

Offline

#9 2007-03-15 12:41:20

Qwest
Member
From: London, UK
Registered: 2007-01-24
Posts: 112

Re: Sort order using a custom date field?

Sorry Axueer, i don’t know about these plug-ins. Somebody else should be able to help you soon!

Offline

#10 2007-03-15 12:42:26

axueer
New Member
Registered: 2007-03-15
Posts: 7

Re: Sort order using a custom date field?

I can’t download the “cbs_category_list” plugins.I don’t know why….

Can you give me a URL to download?

If you have, you can give me use MSN,thank you!

Last edited by axueer (2007-03-15 12:43:54)

Offline

#11 2007-03-15 12:50:37

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Sort order using a custom date field?

axueer, download link for cbs_category_list

Qwest, you could try using <txp:if_different /> to highlight the first event:

<txp:if_different><span class="highlight"></txp:if_different>
  <txp:title /> and other event info
<txp:if_different></span></txp:if_different>

Offline

#12 2007-03-15 13:06:49

axueer
New Member
Registered: 2007-03-15
Posts: 7

Re: Sort order using a custom date field?

rund ,thank you very much!

I download the “cbs_navigation_menu” plugin too.
Used the URL:http://users.edpnet.be/cbeyls/digitalia/files/cbs_navigation_menu.zip

Can you ask me this question?
http://forum.textpattern.com/viewtopic.php?id=21649

Offline

Board footer

Powered by FluxBB