Skip Navigation

[Resolved] Dynamic Classes with a dynamic field

This support ticket is created 3 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by alexG-11 3 years, 3 months ago.

Author
Posts
#2150369

Hi I'm using Toolset Block for first time I had used Toolset Layouts and Toolset Views many times before .

I try to add a class with the value of a dynamic field "orientacion". With the html option.

I try this
[tb-dynamic-container provider='__current_post' source='media-featured-image-data' field='' removeDeadLinkTarget="true"]<figure class="wp-block-image tb-image tb-image-dynamic tb-image-frame-none [tb-dynamic provider='__current_post' post='current' source='orientacion' ]" data-toolset-blocks-image="1"><img src="[tb-dynamic provider='__current_post' post='current' source='media-featured-image-data' size='large' force-string='first' ]" alt="%%tb-image-alt-text%%" class="%%tb-image-wp-image-class%%"/></figure>[/tb-dynamic-container]

And this

[tb-dynamic-container provider='__current_post' source='media-featured-image-data' field='' removeDeadLinkTarget="true"]<figure class="wp-block-image tb-image tb-image-dynamic tb-image-frame-none ($(wpcf-orientacion)) ]" data-toolset-blocks-image="1"><img src="[tb-dynamic provider='__current_post' post='current' source='media-featured-image-data' size='large' force-string='first' ]" alt="%%tb-image-alt-text%%" class="%%tb-image-wp-image-class%%"/></figure>[/tb-dynamic-container]

I read many artiles of the documentation and foru topic and i don't see any solution.

Can you help us?

#2150561

I found the solution.

I activated the legacy mode wirth this link

https://toolset.com/forums/topic/edit-view-when-toolset-block-used/#post-1512905

and then i can edit it with [types]

[tb-dynamic-container provider='__current_post' source='media-featured-image-data' field='' removeDeadLinkTarget="true"]<figure class="wp-block-image tb-image tb-image-dynamic tb-image-frame-none [types field='orientacion' ]" data-toolset-blocks-image="1"><img src="[tb-dynamic provider='__current_post' post='current' source='media-featured-image-data' size='large' force-string='first' ]" alt="%%tb-image-alt-text%%" class="%%tb-image-wp-image-class%%"/></figure>[/tb-dynamic-container]