Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Smart Search Filter by month View modes: 
User avatar
Member
Member
Pete - 10/23/2013 10:21:29 AM
   
Smart Search Filter by month
Hi,

this seems like a simple task but I have been stuck with it for hours.

I want to have a filter on the news page where user can select month and year. When submitting the page it populates with relevant results based on NewsReleaseDate.

I have created two smart search filters - one for month and one for year. However I am not sure what I should add to the 'Values' field.

For a 'Year' field I ended up with

+_NewsReleaseDate.Year;{% CurrentDateTime.Year - 2%}

but this does not work.

Could someone point me in the right direction, please?

Also is there a way to list all months in the dropdown other than typing each month explicitly?

Thanks,

Pete

User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 10/23/2013 12:49:54 PM
   
RE:Smart Search Filter by month
Would this require a custom filter webpart to be made? I am about to take on a project to do the same thing.

User avatar
Member
Member
Pete - 10/30/2013 9:49:03 AM
   
RE:Smart Search Filter by month
Is there really no other way than to create custom filter webpart for this feature? It seems like simple task enough to be able to build it using Kentico interface.....


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/4/2013 1:15:43 AM
   
RE:Smart Search Filter by month
Hi,

Does it work when you use the sample from the search syntax and add some date range in given format?
How are the macros resolved? Have you used the macro debug?

I believe it is just format issue that the macro is not returning the date in format Lucene.Net expects. This may require creating a custom macro.

Best regards,
Juraj Ondrus