0

I have a nice jquery animation built on a separate page but now, would like to incorporate it as a front page in drupal. I tried panels but the jquery doesn't seem to kick in and it's hard to debug anything there. So, basically, any option is OK, including a separate static page somehow inserted into the front page, really, anything. I have to get this up soon and would appreciate help.

joe
  • 1

1 Answers1

0

Assuming you want to insert a static block of HTML into a region in your front page, a good option may be the Block Theme module. It should work the same for Drupal 6 or 7. It can easily do what you're describing.

You can then add the jQuery for your carousel to a JavaScript file included via your theme's info file or through the theme function drupal_add_js (there's more detail in my answer here). If you're using Drupal 7 and you're including a custom JS file, you'll need to wrap your jQuery as explained in the link above.

Community
  • 1
  • 1
g_thom
  • 2,810
  • 2
  • 18
  • 18
  • Thank you, I downloaded blocktheme and can't get it to work after checking and rechecking their readme file. Others seem to have this issue as well. At this point I am wondering about creating a new page and inserting the header from drupal, but honest, I think this is very dicey in drupal – joe Aug 17 '11 at 15:40
  • I've pasted the page (not working on fiddle but working locally) to see if you have ideas for integrating into the drupal as a front page http://jsfiddle.net/jhanjon/hnx7t/ – joe Aug 17 '11 at 16:49
  • Well, what worked for me thus far is to get rid of all the other styles in the custom block--themeblock--custom.tpl, after all why do I need them? So this works for now:
    > Not sure what attributes apply yet, where the default block.tpl looks like this
    > At least it's a start for me to start my project.
    – joe Aug 17 '11 at 18:37
  • @joe, glad that's working for you :). If my answer of going with Block Theme was helpful for you, consider marking it as accepted. – g_thom Aug 17 '11 at 20:38
  • Sure, not exactly sure where to do that yet, but again, this is only a start because I still need to configure all the elements and how to deal with drupal's jquery. At first I will try to not call jquery assuming it's alreayd in memory, so only the plugins and custom scripts will be called – joe Aug 18 '11 at 02:58
  • It's working really great, in fact, I just added the style sheet using @import and left the print $classes so as to pick up the entire sheet. The style sheet indeed gets used by the block, totally! Same with the javascript, and I didn't call my version, just drupal's one which is in memory was good enough. I did use drupal_add_js and wrapped it as you suggested, thanks! When I finish and put it on a remote server, I'll post the result. – joe Aug 18 '11 at 05:54