[Solved; work around] Nested Dynamic Content

Hi there,

I found this post about nested dynamic content Dynamic content with two nested fields but it doesn’t work for me.

I have a blogpost with custom fields (ACF) that I would like to call inside dynamic content. For example: {{dc:post:permalink post={{dc:acf:post_field field="product_id"}} The result is the permalink of the blogpost itself and not of the post-id.

Is there a way to nest the post-ID as dynamic content in a string of dynamic content?

And is there a way to use nested dynamic content with the image element?

Many thanks!

Hey @Dagaloni,

In your post, you’re using the permalink DC. Try replacing “permalink” with “id” like {{dc:post:id....

image

Thanks.

Thank you! I tried {{dc:post:id post={{dc:acf:post_field field="product_id"}} but that doesn’t work for me.

Also, I’m not sure that this would result in the desired outcome.

What I want is to create a layout page with a section that displays a product (product image, product title, price, add to cart button) made using DC. The layout is for a blog-single and on each post I have an custom field (ACF) for the product-ID. I would like to pull that ID in the DC on the layout.

Ideally I would have something like this:

{{dc:woocommerce:product_price product={{dc:acf:post_field field="product_id"}}

{{dc:woocommerce:product_title product={{dc:acf:post_field field="product_id"}}

Is that possible? And if not: could this please (:raised_hands::pray:) be added as a feature?

Many thanks!

Hello @Dagaloni,

In order to help you with your concern, we need to check your settings. I would request you, please share your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin level username and password
  • Exact Layout URL

You can find the Secure Note button at the bottom of your posts

Thanks

Thank you! See the secure note

Hello @Dagaloni,

I tried to access your site dashboard but it is not working on my end due to the secureity plugin. Please disable the security plugin and let us know when it is accessible. Please have a look at the given screenshot in the secure note.

Thanks

I have unblocked you.

Hello @Dagaloni,

At the moment, the nesting of the dynamic content is not possible. Our developers has been exploring ways to do it. Please check out the reply of @Alexander, one of our developers regarding the matter:

In the meantime, it is best that you change your ACF field into a post object.

So that you can use a Looper Provider Dynamic Content in displaying the product associated with your post.

Hope this makes sense.

Thank you for you reply! Good to see they are exploring. Would love to see it make to a future update.

The post object method is working amazing! Many thanks!

Edit: For everyone who’s not familiar with the post object method, here’s a post to set it up: Pull from ACF "Post object" field

Hi @Dagaloni,

We’re glad that it is now working great on your end! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.