The Content List widget is pretty flexible - with the right combination of settings, it can be used to show the latest 5 new pages, a single random item, etc, and can format them as a list or as content. It would be great to add a sort option for Updated date. Then you could create lists of "recently updated" content too.

Comments

cboyden’s picture

Status: Active » Needs review
StatusFileSize
new1.2 KB

Patch is attached.

cboyden’s picture

Here's another version that also adds the updated date to the display - it makes sense to have it as an option if this is to be used for a Recently Updated list.

dsnopek’s picture

I haven't tested this yet, but I'm curious about the affect these changes will have on existing sites? If someone already used a "Content list" widget, will this add an "Updated" field or will they have to edit the widget and enable the field for it to appear? Obviously, we'd prefer the latter.

cboyden’s picture

I did a quick test:

  1. Set up a clean install of latest Panopoly dev without the patch
  2. Added a Content List widget to the Content Demo page, using default settings
  3. Applied the patch to Panopoly Widgets
  4. Reverted the feature
  5. Cleared all caches
  6. Checked the Content Demo page - updated dates were not displayed
  7. Clicked Customize this page
  8. Clicked Settings for the Content List widget
  9. The Updated Date box was checked, but the preview did not show the field
  10. Closed the settings without saving
  11. Saved the page (clicked Save, not Cancel)
  12. Updated dates still not displayed
  13. Clicked Customize this page again
  14. Clicked Settings for the Content List widget
  15. The Updated Date box was checked, but the preview still did not show them
  16. Clicked Save on the widget settings without making any changes
  17. The widget then included the updated dates

This is a bit confusing, since the preview does not match what the checkboxes should be doing. But it looks like it won't add the updated date to widgets until you actually save the widget.

dsnopek’s picture

Cool, thanks for checking!

dsnopek’s picture

StatusFileSize
new3.24 KB
new2.18 KB

I just tested this and made a couple changes:

  1. Changed the field name under "Field settings" from "Content: Updated date" to just "Updated date"
  2. Also, renamed "Date" to "Post date" under "Field settings" so it's clear how they are different.
  3. Removed the space after "Updated " in the field label (not necessary and looks weird under "Field settings")
  4. Excluded the "Updated date" field by default - I think probably you only want one in most cases, so we default to just the "Post date" but users can easily add "Updated date". I think this is especially important for the "Content item" widget (which is also affected by these changes).

  • dsnopek committed 32a9362 on 7.x-1.x
    Update Panopoly Widgets for Issue #2395719 by cboyden, dsnopek: Add...
dsnopek’s picture

Status: Needs review » Fixed

Hrm. Also swear that I commented on this one! Anyway, this has been committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.