Earl
Well-known member
I have this HTML type widget in the search_results template which has access to the $search object of the search_results template.
(template passes $search to the widget via a context variable context-search, I'm using template modification to add the widget position to the search_results template)
So, basically I have a template named _widget_my_recent_searches and it has access to $search object via $context.search
I can only get the value of $context.search.search_type if I put it between <xf:callback> tags{here} </callback>, but I'm already using it to pass the value of $context.search.search_query
I want to pass the value of $context.search.search_type using params="{here}"
But this is not working, when I debug the code, This string value: "##0" coming as $param
Can you spot the problem? Is this possible? What am I doing wrong?
(template passes $search to the widget via a context variable context-search, I'm using template modification to add the widget position to the search_results template)
So, basically I have a template named _widget_my_recent_searches and it has access to $search object via $context.search
I can only get the value of $context.search.search_type if I put it between <xf:callback> tags{here} </callback>, but I'm already using it to pass the value of $context.search.search_query
I want to pass the value of $context.search.search_type using params="{here}"
But this is not working, when I debug the code, This string value: "##0" coming as $param
HTML:
<xf:callback class="Earl\\AddOn\\Callback" method="getHtml" params="['test','{{$context.search.search_type}}']">{$context.search.search_query}</xf:callback>
Can you spot the problem? Is this possible? What am I doing wrong?
Last edited: