Hi,
I'm trying to add a search forum widget to my template by using the xf:widget syntax. My goal is to save the settings for the Widget in custom thread fields. But I think I need some help. Until now I tried:
The value 123 would be dynamic and would be replaced with a variable from custom thread fields. I can't us a manually created widget because I would need about 200 of different possible combinations.
I think in theory this should be possible:
But I have problems getting it to work. Any suggestions?
Thanks!
I'm trying to add a search forum widget to my template by using the xf:widget syntax. My goal is to save the settings for the Widget in custom thread fields. But I think I need some help. Until now I tried:
Code:
<xf:widget class="XF\Widget\SearchForum" node_id="123" />
<xf:widget class="XF\Widget\SearchForum" params="{{ {'node_id': '123'} }}" />
The value 123 would be dynamic and would be replaced with a variable from custom thread fields. I can't us a manually created widget because I would need about 200 of different possible combinations.
I think in theory this should be possible:
- You can also provide widget-specific options as attributes when the class attribute is used.
But I have problems getting it to work. Any suggestions?
Thanks!
Last edited: