I'm using a custom XenForo 2.x theme. I have enabled Threadloom on the Threadloom options page in the Admin Control Panel, but user searches are still going through native search. How do I route searches via Threadloom?
Once enabled, Threadloom automatically routes searches via Threadloom for the standard XenForo theme, Audentio's UI.X theme, and PixelExit's Core theme. If you are using a custom theme or template, user searches on your site may still get routed to native search, even after you enable Threadloom on the Threadloom options page in AdminCP.
You can fix this with some minor template changes. First, however, we recommend confirming the issue with the following steps:
- Go to AdminCP > Appearance > Template Modifications.
- Look for the Threadloom modifications section, and locate search_bar and uix_searchMinimal.
- If both of those modifications display "0/0/0" next to it, continue with the steps listed below; otherwise, drop us line, since there may be something else going on.
Once you are ready to modify your templates, proceed with the following:
- Go to AdminCP > Appearance > Search Templates.
- In Template Contains, search for "search/search".
- Identify the templates that you want to modify in order to use Threadloom.
- Only replace templates that contain:
<form action="{{ link('search/search') }}" method="post" class="menu-content" data-xf-init="quick-search">
Do not replace other references to "search/search".
- In the selected template(s), replace the opening tag of the search form, e.g.:
<form action="{{ link('search/search') }}"
with the snippet below:
<form action="{{ $xf.options.threadloom_search ? link('threadloom/search') : link('search/search') }}"
So, for example, if your template previously read:
<form action="{{ link('search/search') }}" method="post" class="menu-content" data-xf-init="quick-search">
It should now read:
<form action="{{ $xf.options.threadloom_search ? link('threadloom/search') : link('search/search') }}" method="post" class="menu-content" data-xf-init="quick-search">
As a reminder, these changes will route search via Threadloom only if Threadloom is enabled on the Threadloom options page in AdminCP. If you continue to encounter issues after following these steps, drop us a line.
Comments
0 comments
Article is closed for comments.