99 Posts
SimonD
7 years ago
2
Topic

Hello,

Here is my project:

I'm creating a publications list blog.

Each publication is created through a content type in which there is a calendar field to manage the publication date (which is not necessarily the article publication date).

I would like my publications list blog is order by publication date (the most recent publication on top).

And I would like to display on top of my publications list, a search form with a simple select field in wich there are the publication years only (I don't want to display the calendar field).

I'm suspecting that I must use a simple dynamic Seblod field to fetch the values stored by the calendar field and make some processing to extract only the year.

Could someone give me some advices on how to make this.

Regards

Get a VIP membership
4229 Posts
Kadministrator
7 years ago
1
Level 1

For first one just put calendar field in the ordering tab fields.

For second one you will need to do search on two hidden calendar fields, that will get values from select dynamic field using conditionals. In the select dynamic create values for each year with starting date 1.1. (e.g. 1.1.2014 ) and add some custom attribute with end date for that year (e.g. 31.12.2014). they you can use "filled by" conditional to change your hidden calendar fields value (see legend in the conditionals on how to get attribute value )

99 Posts
SimonD
7 years ago
0
Level 2

Hi Klas,

Thank you for your reply.

I'm not sure to well understand you solution.

Why do I have to create 2 hidden calendar fields? The one I've created to set the date of the publicatiion isn't enough?

You suggest to create values in a select dynamic field. But I've thought that in a select dynamic field values are autmatically created with a SQL query.

Regards

Get a VIP membership