Closed Ability to specify input name for various criteria helpers

TickTackk

Well-known member
Licensed customer
Affected version
2.2.10 PL1
Currently, if one wants to add support for user searcher in their add-on along with thread searcher they need to go a long route (duplicating the code of both the templates to change the input name) or the not so long route (messing around post template render to change the input names) to make sure both the helper_user_search_criteria and helper_thread_search_criteria do not have the same input names.

Having the ability to change input name via something like this:
HTML:
<xf:include template="helper_user_search_criteria">
    <xf:set var="$input" value="user_criteria" />
    <xf:set var="$criteria" value="$entry.user_criteria" />
</xf:include>

<xf:include template="helper_thread_search_criteria">
    <xf:set var="$input" value="thread_criteria" />
    <xf:set var="$criteria" value="$entry.thread_criteria" />
</xf:include>
would help a lot and automagically add support for various other add-ons that are extending those templates and the searcher.

Not really a bug but more of a feature request.
 
Automated triage: Design issue

Thank you for reporting this issue. The user and thread search criteria helpers still use a fixed input name in the current version, and they work as intended where the core uses them. Making that name configurable would be a change to how the helpers are designed rather than a bug fix, so this is better treated as a suggestion.

This is an automated assessment. A member of staff may review and update it.
 
Back
Top Bottom