Polylang dynamic content plugin almost working

Hi,

Browsing trough the forum, I found a lot of statements on polylang and the problems it experiences.
I ran into the issue that I could not build a condition set for a layout based on the current language.

So I decided to create my plugin to provide this.

This plugin works nicely, it registers {{dc.polylang.currentlang}} to return the current active language on the website which you can then compare to the slug e.g. nl or en in my case.

What I tried to achieve with the dynamic options was that the selection of the polylang variable would display a list of available languages in the 3rd box where I could then select is or is not in the 2nd.

However, I’m unable to connect these two, so somewhere I’ve missed something, or this is not possible at all.

Any help appreciated.

1 Like

Try moving the action to registry of the dynamic options to this action cs_dynamic_content_register. Like I have here.

Try sending me your conditions registry code as well and I can help you out there if that doesn’t help.

Hi,

I’m not really sure what is different in your approach, I also start to realize what I want will not be working with Dynamic Content
The Dynamic Options are for options on the dc tag itself, not as potential compare values for a tag.

The action name is different in my approach. You would just use that for the dynamic option registry.

As in you want the select box to be apart of the Dynamic Content UI? Let us know how we can help here if I’m misunderstanding.

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