Share » Forums » Setup & design » Fetch sort via specific field?

Fetch sort via specific field?

Fetch sort via specific field?

Sunday 27 April 2003 8:47:46 am - 7 replies

Author Message

Paulo Almeida

Sunday 27 April 2003 2:38:50 pm

Hi

I think fetch doen't support defined fields. Look at http://ezwiki.blanko.info/index.php/3XHT_FetchFunction .
In your case, the best i found is modified field, could be an solution.

Paulo

PACPI.COM Internet Consulting
http://pacpi.com

Jan Borsodi

Sunday 27 April 2003 11:03:32 pm

You could create a post publish workflow which would read the date from an attribute in the object and then set it as publish date.
This would ofcourse require writing a custom workflow type in PHP.

What's the url of your page?

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

arthur foelsche

Monday 28 April 2003 12:49:02 am

The url that i'm working at is here:

http://red.eggplantmedia.com/~fluoride/ez/index.php

what is the difference between: "class_identifier" and "class_name" ? If I'm doing a fetch based on either of these, what would be the results?

any tips on writing the work flow to do this? I haven't experimented with workflows at all yet, and am a bit unsure of how to start....

It seems like this would a really useful piece of code.... is there away to define one of the classes in article to relate to published? I guess ultimately having a fetch support specific fields would be pretty important.

thanks

arthur

Paal Are Solberg

Wednesday 28 May 2003 6:35:08 am

I have no good solution, if you find one please post it :)

A poor solution could be to specify the Object name pattern for your article class as article_date, and then sort_by name in the fetch-statement?

...but you wold have to republish all your articles(?), and also the change could make it difficult to identify your articles in the admin-site (since they would be listed by article_date there as well)...

Sorry if this is not very clever, i'm new to this

Teemu Vesala

Wednesday 04 June 2003 2:00:07 pm

This goes a bit hackish way but this is what I did to get sorted by the datetime field:
Object name pattern of the class were changed to
<date><title> and then sorting can be done based to 'name'. It works fine. (I've got datetime field with identified 'date')

Teemu =)

Matthew Knell

Tuesday 08 July 2003 9:08:31 pm

Has anyone tried Teemu's solution? Has it worked for you? I tried this, and it didn't work for me. I'm in the same bind, and if I can't come up with anything better, I'm going to have to figure out how to join like 4 tables in the database and manually change the publish date, or go through and make sure to publish everything again in the correct order.

I love ez3 - but this is a huge issue for me at this point.. any ideas would be greatly appreciated (ez crew, especially ;) )

Chris Winchester

Friday 08 August 2003 3:37:52 am

If you can find a way to live with it you could make it a convention that the news article name starts with your article date written in reverse order (yyyy-mm-dd, e.g. 2003-07-21 for 21 July 2003). It's a bit awkward, but it does then allow you to sort on name to get a date sort.

I'm currently doing this on my news pages until the improved fetch function comes out in 3.2, which I understand will allow sorting on your own fields.

- Chris

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu