soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
315 stars 30 forks source link

(3.0 Alpha 1) - Unable to use helpers in repeater component #397

Open wplit opened 5 years ago

wplit commented 5 years ago

Describe the bug Not sure if bug or feature request as it's not clear if this should already work.

We can't add dynamic data to the helper elements such as the testimonial, icon boxes, pricing table etc. This means, none of them can be used inside loops.

Testimonials especially would be useful for being able to put inside loops, otherwise there isn't an easy way to make them dynamic for clients to edit. Most of the time, testimonials are added to WP sites either as a CPT or using a repeater field. I think the expectation would be to be able to use the testimonial layouts from design sets to show this data.

In the case of the the testimonial, the image does currently have a data option, and it does show the ACF fields, but it doesn't actually pull in the image.. This is why I thought it was a bug.

Screen Shot 2019-07-12 at 8 39 44 am

The actual text in the testimonial though doesn't have a data option, so can't be used dynamically at all.

Screen Shot 2019-07-12 at 8 42 46 am

Now we can make these into Gutenberg blocks, there is a way to give client editing, but for maximum flexibility going forward, allowing all Oxygen elements to be dynamic could be a good idea.

albertso commented 5 years ago

These may be related:

Wordpress Dynamic Data components like post Tags or Categories in a Repeater always display "No data for field" in editor, but they are displayed correctly in frontend.

Code-Blocks are only displayed on the first Repeater element in editor, but all of them displayed correctly in frontend.

Also point out that on the current 3.0 alpha, all the id's in the Repeater are repeated for each element.

albertso commented 5 years ago

For example, if we use a code block in a repeater to display a thumbnail with some attributes

<img src="<?php the_post_thumbnail_url();?>">

Only the thumbnail for the first item appears in backend, the remaining code blocks output an empty div.

lohint commented 3 years ago

The same happens to me. Not showing custom data pulled by code block in the backend, frontend works fine. I do not want to place new bug report, but I don't know if these older reports are being checked over time.