WebsiteBaker Support (2.12.x) > General Help & Support

Search for different variations of characters (a, á, à...)

<< < (3/5) > >>

Gast:
i did not found the frontend_body.js inside of the template - that file place the search submit button. Add this line as last line before this line with </body> (nearly at the end of the code from index.php of the used template)


--- Code: ---<script id="bodyjs" src="<?php echo TEMPLATE_DIR; ?>/js/body.js"></script>
--- End code ---

from my view, it is also important, to include the bootstrap-Files directly in this CSS, but i'm not the bootstrap-expert

Gast:
forget the code in my last answer, this here is the correct code to include the frontend_body.js automatically - sorry for the trouble, maybe, a admin can remove the wrong code in the last posting - thx


--- Code: ---<?php
// if you want to include jquery before body end,
#register_frontend_modfiles_body('jquery');
// automatically include optional WB module file frontend_body.js) should be always set
register_frontend_modfiles_body('js');
?>
--- End code ---

svsanchez:
Hello Jacoby, thank you for your reply. I added the code to my template but it still doesn't work (no search button / no search is performed when I hit the ENTER key).

I had some similar lines on my <head> section, this is what I have now:


--- Code: ---<?php
// automatically include optional WB module files (frontend.css, frontend.js)
if (function_exists('register_frontend_modfiles')) {
register_frontend_modfiles('css');
// register_frontend_modfiles('jquery');
register_frontend_modfiles('js');
} ?>

<?php
// if you want to include jquery before body end,
#register_frontend_modfiles_body('jquery');
// automatically include optional WB module file frontend_body.js) should be always set
register_frontend_modfiles_body('js');
?>


--- End code ---

Gast:
the code is correct, but deactivated

svsanchez:
Hello Jacobi, there was that portion of code deactivated because it was twice on the page, the 'activated' code was a few lines above. I removed the duplicated code but it still doesn't work. I'm also curious to know how are you seeing that code, when I open the page in my browser and see the source code I get this:


--- Code: ---<title>
Test - Distribuidora Alcance - </title>

<link rel="stylesheet" href="/modules/WBLingual/frontend.css" media="screen" />
<link rel="stylesheet" href="/modules/anynews/frontend.css" media="screen" />
<link rel="stylesheet" href="/modules/bakery_search/frontend.css" media="screen" />
<script>
/* inserted by register_frontend_modfiles */
var URL = 'https://www.distribuidoraalcance.com';
var WB_URL = 'https://www.distribuidoraalcance.com';
var THEME_URL = 'https://www.distribuidoraalcance.com/templates/DefaultTheme';
var TEMPLATE_DIR = 'https://www.distribuidoraalcance.com/templates/internas';
var TEMPLATE = 'internas';
var EDITOR = 'ckeditor';
var LANGUAGE = 'ES';
</script>
<script src="/include/jquery/domReady-min.js"></script>
<script src="/include/jquery/LoadOnFly-min.js"></script>


<script src="/modules/bakery_search/frontend_body.js"></script>

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version