Here we can clearly see that it's fine to load the slider in the displayTopColumn hook, and since the content is showing in the html page there is no problem, so far, again.
The part which seems not to be working in the above is here:
When browsing the page through inspector, I can't find any trace of the jquery plugin being called (bxslider).
And actually, when visiting the demo page from thirty bees (https://front.thirtybees.com/) browsing through inspector I can't find any trace of jquery or bxslider. I don't understand how it's called. At all.
My issue seems to be really with the javascript, as I tested the integration with the same code than the default theme (using the same theme module).
I am missing the navigation:
<div id="homeslider-pager">
<span>More offers:</span>
<span id="homeslider-pages"> [EMPTY] </span>
</div>
The way the .bxSlider feature is called is simply by appending the .bxSlider function to a class or an ID.
$('#homeslider').bxSlider(
But since the javascript (or the jquery plugin bxslider) does not seem to be loaded, it does not work.
Can someone help me understand how the javascript is supposed to be loaded? I did not touch the core module, and the slider is correctly positionned to the right (TopColumn) hook, so it should load.
Question
Séane
Hello,
Working on a personal them to get to know Thirty Bees, I am stripping down the code to better understand how it works.
I've come to the HomeSlider module which is a bit painful to me.
Basically, I am re-arranging the structure of the templates/modules, so it is easier for me to play with.
I duplicated the module into my theme folder:
Theme_Name > modules > homeslider >
- header.tpl
- homeslider.tpl
- index.php
The module is called through the 'displayTopColumn' hook which was called in the header.tpl initially.
I decided to call the hook in another .tpl, called topcolumn.tpl.
This tpl contains:
and I am calling this .tpl in the layout.tpl with an include:
The slider is loading (the content, the tumbnails, etc.).
So far, there is nothing really wrong.
Still, there is one thing which is not working:
the .bxSlider implementation.
.bxSlider is supposed to be called in the root/modules/homeslider/homeslider.php file
Here we can clearly see that it's fine to load the slider in the displayTopColumn hook, and since the content is showing in the html page there is no problem, so far, again.
The part which seems not to be working in the above is here:
When browsing the page through inspector, I can't find any trace of the jquery plugin being called (bxslider).
And actually, when visiting the demo page from thirty bees (https://front.thirtybees.com/) browsing through inspector I can't find any trace of jquery or bxslider. I don't understand how it's called. At all.
My issue seems to be really with the javascript, as I tested the integration with the same code than the default theme (using the same theme module).
I am missing the navigation:
The way the .bxSlider feature is called is simply by appending the .bxSlider function to a class or an ID.
But since the javascript (or the jquery plugin bxslider) does not seem to be loaded, it does not work.
Can someone help me understand how the javascript is supposed to be loaded? I did not touch the core module, and the slider is correctly positionned to the right (TopColumn) hook, so it should load.
Séane
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now