1

I have a problem that I have not been able to find the solution. I have an entity reference field for a node to display specific news I need them to be sort them by the date they were created by the latest. In the field settings there is an option to sort by created but it is not applying the sorting. Is there another way that I can sort them maybe using rules, or programatically. Any idea what I am doing wrong? I cannot use views for this particular problem because each node display different news, do it manually is not an option either because I am creating the content using web services.

NEWS ORDERED BY THE LATEST

September 12, 2012 lorem Ipsum is simply dummy text of the printing and typesetting industry.

June 12, 2012 lorem Ipsum is simply dummy text of the printing and typesetting industry.

May 12, 2012 lorem Ipsum is simply dummy text of the printing and typesetting industry.

2

You can always use the Views: Filter by an entity reference view option from Entity selection mode and then create a view as per your sorting options and filters and select the view in the select box which shows up.

  • I cannot use views for this particular problem because each node display different news. Any other suggestion? – cayerdis Sep 25 '12 at 3:35
  • 1
    I don't get it. It does not matter which news it displays as long as you know which entity bundle it belongs to. So you can filter it by those bundles or node types and apply sort descending. If that does not work then the only option is to use the hook_form_alter build your own options array and replace it with the one which is there. – junedkazi Sep 25 '12 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.