By rabihs on
Hey all,
none of the modules that uses jquery cycle (views slideshow, views rotator, rotor,..) is working for me when i embed the block in my custom theme.
<?php
$block = module_invoke('views', 'block', 'view', 'banner-block_1');
print $block['content'];
?>
But it's working perfectly when using garland theme for example.
Any help is appreciated.
Thanks in advance
Comments
Were you sure to add the
Were you sure to add the $closure variable to the bottom of your page.tpl.php?
-Corey
Hey coreyp_1, I'm adding the
Hey coreyp_1,
I'm adding the $closure before the body closing tag
what else can be wrong?
try comparing the HTML output
try comparing the HTML output by Garland as opposed to your theme. Are there any obvious differences in the HEAD section? For that matter, do you also have all the necessary variables in that section, too? You can always compare the Garland page.tpl.php with your custom one to see what may have been omitted.
-Corey
Hey coreyp_1, sorry for the
Hey coreyp_1,
sorry for the late reply, well I copied and pasted the garland page.tpl.php file and worked directly on it without styling and I noticed that if I add it from the block section in the admin it works perfectly, but if I add it by code it's not working. Is there any steps that I should be doing or something?
Let's take a step back. So,
Let's take a step back.
So, is your PHP command producing HTML output? At this point, I assume that it is, it is just that the jquery cycle plugins aren't working.
Do you see any javascript errors?
Do you have a demo link?
At this point, my hunch is that, because you're not theming the block, then there's not enough HTML generated so the cycle plugin can work appropriately. In other words, the proper ID's and CLASSes aren't being generated.
-Corey
Hey Corey, Sorry for the late
Hey Corey,
Sorry for the late reply, I was away for the weekend. Thanks for your help.
I"m not getting any javascript errors, as for the demo link i'm working on my machine.
I copied garland's page.tpl.php and called the block at the end of container div. Here''s what i'm getting from the page source:
For drupal generated block:
For the block code I add directly in the page.tpl.php:
Thanks again for your help Corey
I need to see what javascript
I need to see what javascript command is being called. Look for a line that includes
$('something here').cycle(more stuff here);-Corey