I was stuck wondering why this module had ceased to apply the classes, then I saw in the code for classy_paragraphs_preprocess_entity() that it checks the paragraphs view mode is 'full'.

I can imagine there is some reason why this check helps with previews or such, but isn't it valid to want to have a different display for something that uses a non 'full' view mode?

CommentFileSizeAuthor
#4 classy-paragraphs-n2588331-4.patch721 byteskepford

Comments

artfulrobot created an issue. See original summary.

jonraedeke’s picture

I agree that the classes should be added for all view-modes. Then the themer can decide how specific the style should be. Maybe there should be an option for "Limit to full view mode" that is checked by default.

This would be helpful for paragraph items like images that can be added as different view modes. I'd like the user to be able to add an image paragraph item with 3 fields: image upload, view mode select list via View Mode Selector module (small, medium, large) and a class select list (float-right, float-left). This avoids having many view modes just to dictate styling.

kepford’s picture

Yep, totally agree. Been rubbing my eyes wondering why my classes weren't being output. I'm also using View mode selector module with paragraphs. It's a great combination of modules. Patch coming to apply styles to all view modes :)

kepford’s picture

Status: Active » Needs review
StatusFileSize
new721 bytes

Patch that removes the check on the view mode. This needs some testing but it appears to work fine without any issue for me.

damienmckenna’s picture

This will resolve an issue that was logged for Paragraph View Mode: #2579833: Conflict with Classy Paragraphs

  • Ivan Zugec committed 8d3caaa on 7.x-1.x authored by kepford
    Issue #2588331 by kepford, artfulrobot, jonraedeke, DamienMcKenna: Allow...
ivan zugec’s picture

Status: Needs review » Fixed

Thanks everyone.

Patch has been committed.

Status: Fixed » Closed (fixed)

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