7 years ago
5
Topic

Howdy All!

This is a bit of a complex one - so thanks in advance if you take the time to read through this -

Our installation has events, which have 1 to many "dates" (they shouldn't be published if no dates are present - so these should be irrelevant here) so our list that we are outputting should have the following (ordered as we wish to have it ordered):

  • Course 1
    • 10 July 2016
    • 11 July 2017
  • Course 2
    • 15 July 2016
    • 15 August 2016
    • 15 September 2016
    • 5 July 2017
  • Course 3
    • 20 August 2016

Each occurance of a date is stored as an instance of the group x (each date has several fields like date, ID and some Meta info - mostly to be passed to our booking system) and each Course is an Article (Content type: event - a number of fields, not relevant to the sorting though)

Currently we rely on Manual ordering - which for 35 events with a ~80 sittings between them isn't very managable - we are looking to set a list & search type up that will order the Courses by the first (soonest/next) date of an event - which is where we've ran into a snag...

How would we set up a list & search type to be ordred by the lowest timestamp stored in the introtext?


Thanks in advance for any help! :)

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
1
Level 1

7 years ago
0
Level 2

Thanks for your reply. I had read that page and watched the tutorial before, but I think I am missing something.

I want to order my articles based on the next date, in list of dates which is stored in a group X. I can add the Group X to the Ordering Tab, but I can't specify the field WITHIN the Group X which I want to order by.

Any thoughts? Thanks again.

4229 Posts
Kadministrator
7 years ago
1
Level 1

What happens if you add field from within group x to ordering tab? When you are searching for data that is stored in group x yo should always use fields from within for search so I would think it is the same for ordering

http://www.seblod.com/resources/extensions/plug-ins/group-x-field

7 years ago
0
Level 2

When I do that, the list is ordered randomly. I cannot see any kind of pattern to it.

> Menu item for the list, Default Order is set to "Use Global"
> In the list and search type, in ordering configuration, I have set "Default Order" to "Inherited"
> In ordering, I have added my group X child field (it is a "Calendar" and the storage format is timestamp)
> The same child field is also in the "Search Form" tab.
> If I remove all data from a content item's Group X (in otherwords, if I have no date set), the item is still listed in the same position as it was when it had a date.

I really don't understand what I'm doing wrong. Could it be something to do with the storage options? 

> Child item of the Group X has Format / Object of Standard | Article | rcpeveventsittingdate
> The Group X storage format is Custom | Article | Introtext

Hope that helps.

Thanks again!

4229 Posts
Kadministrator
7 years ago
0
Level 1

Please see tutorial linked above for right storage settings for searches

Get a VIP membership