Ordering by 'date' field: how to? [Fixed]

More
12 years 8 months ago #23673 by SteP
I'm developing a website containing many Flexicontent items (grouped under subdirectories) to be ordered by a custom "date type" field.
The website contains several press review subdirectories, where each item represents a press review issued in a certain date. When opening a directory, the item list must be ordered by the press review printing date (that is a date type field), in descending mode (the first visible review must be the more recent one).
I can't find a direct way to order the directory content by a 'date type' field, it seems that only text fields are allowed to be used as custom ordering field.
Is there a way to get it working?
I have also tried to use the default ordering, but I can't find an easy way to order items assigned to a subdirectory (ordering item in subdirectories doesn't work, I have read that this behaviour depends on the multiple assignment that a item can have, but I think that it should be found a way to get ordering working anyway...).
I'm using the latest RC4 release, on Joomla 1.5.25
Any help is appreciated
Thank you in advance

_________________________________________
MMC Edizioni - www.mmcedizioni.it
Website Developer & Graphics

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #23941 by ggppdk
mmm, there is no reason not to allow ordering by date,

I have incorrectly excluded date and other fields from having ability to be used for ordering, will commit a small fix for this, excluding only certain fields, e.g. toolbar field,

To have a quick fix now, please edit :
administrator/components/com_flexicontent/models/category.xml

change line:
<param name="orderbycustomfieldid" type="fields" field_type="text" ....

to
<param name="orderbycustomfieldid" type="fields" field_type="" ....

Thanks for bringing this up

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #23946 by SteP
Great! Thank you so much for the hint.

A further suggestion: could it be usefull to add another cascading ordering selectable field (or a couple of fields)? i.e, in my case, I should sort events at first by the "from date" field, than by location (alphabetically).
Yes, it's not an essential feature, but it could help to refine the "first shot" ordering.

Thank you again for this great component

p.s.: it seems that ordering works only for categories having subdirectories: is that my fault?

_________________________________________
MMC Edizioni - www.mmcedizioni.it
Website Developer & Graphics

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #23961 by ggppdk
Subcategories must not be related,

what you mean it is not working, you mean the frontend is showing no items or the ordering is not working?

Do the items of this category have multiple values for the date field?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #23972 by SteP
I try to better explain what I have.

The Category structure is like this:
main-level ___ first-sublevel--first-dir ___ second-sublevel--first-dir-a
....................|..............................................|__ second-sublevel--second-dir-a
....................|
....................|___ first-sublevel--second-dir ___ second-sublevel--first-dir-b
..........................................................................|__ second-sublevel--second-dir-b

main-level and first-sublevels have no items assigned
seconds-sublevels have various item assigned

I order all levels by a "date" field

main_level is correctly ordered by that date field, and also all the first_sublevels

second_sublevels (the ones having items assigned, with no subcategories assigned) are not ordered by date, but by default ordering

obviously all cat have the same setting (cloned from the first one):
- Display subcategories' items: all sublevels
- ordering by "date" custom field

_________________________________________
MMC Edizioni - www.mmcedizioni.it
Website Developer & Graphics

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.469 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline