Forums / Setup & design / Importing and sorting a blog

Importing and sorting a blog

Author Message

Marco Carnazzo

Tuesday 15 November 2005 2:24:27 am

Hi.

I have to import a blog from b2evolution to ezPublish.
First question: is there a script to do it?
I think no, so I decided to insert manually every post.
I created a new datefield for weblog class and I want to sort every post using this field.
But how?

Searching infos in this forum I found this follow solutions:

1. Using priority like a date (i.e. setting "20051115" as priority for a today post) and sorting post by priority. But how can I set priority automatically?

2. Using "<datefield>, <title>" as object pattern name and sorting post by name. But so, ezPublish uses long date as name and sorts post in this way: first every post inserted on Friday, then every post inserted on Monday, then every post inserted on Saturday and so on...
I tried to use "<datefile|datetime(custom, "%Y %m %d")>, <title>" but without success.

3. Some strange solutions using fetch, sort_by and templates, but I didn't understand very well :)

Can someone help me?

Christian Johansen

Tuesday 15 November 2005 4:55:53 am

You can do the "strange" things with the templates :) If you read everything on this page, I'll almost guarantee that you'll understand what to do:
http://ez.no/doc/ez_publish/technical_manual/3_6/reference/modules/content/fetch_functions/list

You can use a datetime field and sort on that. My experience (though short with eZ) is that dates when ordered won't display today, but a date and time will. Hope this made sense.

Marco Carnazzo

Tuesday 22 November 2005 10:02:16 am

Thank you for the reply.

I followed your suggestion: it was hard but now I'm able to sort object by every attribute :).