XF 2.1 ContainerKey not available!

Osman

Well-known member
Code:
<xf:if is="$containerKey == 'node-4'">

It works when I write normally. But I can't print the option I created.

I'm trying to pull the plugin option I've created here into (4) fields, but it doesn't happen.

My example code:
Code:
<xf:if is="$containerKey == 'node-{{$xf.options.my_number}}'">

What was the wrong I didn't find. If someone had face of with same problem maybe wants to help.
 
Last edited:
Code:
<xf:if is="$containerKey == 'node-4'">

It works when I write normally. But I can't print the option I created.

I'm trying to pull the plugin option I've created here into (4) fields, but it doesn't happen.

My example code:
Code:
<xf:if is="$containerKey == 'node-{{$xf.options.my_number}}'">

What was the wrong I didn't find. If someone had face of with same problem maybe wants to help.

Try it with just one set of parentheses it might fix it. According to this thread


Try:

Code:
<xf:if is="$containerKey == 'node-{$xf.options.my_number}'">

I haven't had the opportunity to use options inline like that before but it's worth a shot. From the way the thread appears it might be the solution
 
I try set this condition for displaying a widget. The widget should only visible in data-container-key="amsCategory-18" but it doesn't work.
What did i wrong? Could somebody give me a hint?

Screenshot 2020-03-04 19.43.48.webp
 
Top Bottom