Showing posts with label Problem With Drupal. Show all posts
Showing posts with label Problem With Drupal. Show all posts

How to add javascript to Drupal Nodes  

Another problem with Drupal Nodes.

This time I was trying to configure a basic node with some javascript to show rotating links. I designed the entire page in macromedia (I usually do that and then copy the code back on drupal node) and checked everything and then pasted the code back on drupal node. But then this problem came up, how should i move the javascript code that I have defined in the head section of my html page into the drupal node. As such I cannot modify the head section of individual drupal nodes.

The solution:
This is how I added the javascript code to this drupal node.
I moved my entire javascript code into a .js file, i.e. the content between script tags. I then copied this .js file onto a definite location on my server. Now I could simply call this js file from the drupal node page without writing the entire script again and utilize it the way I want. Finally i had what I needed, a rotating image gallery using javascript on a drupal page :).

I have removed it as of now so can't put it on display but will show you another javascript example as soon as i get it ready.


PS: If this posts helps you in anyway please comment and support :)

Read More...
AddThis Social Bookmark Button

MetaTags For Drupal Nodes  

Well, this post is about how to add metatags to individual posts/nodes of your drupal installation. For completely newbies, metatags are keywords on basis of which search engines determine the primary content of your pages. Well, that was a very basic idea. The idea is to add metatags to invidual pages/nodes just like you would do in a simple html/php page. Moving ahead, just like everything in Drupal (Drupal is really really extensive), there is a module for adding metatags too. So you need to do is to go to drupal site get the module for metatags and configure it for enabled status in your modules administration page.
The important thing to note out here is that in the module is named nodewords and not metatags or anything like that.

Here is the link for downloading the Nodeword/Metatags for drupal.
http://drupal.org/project/nodewords

I dont think I need to explain anything else to you if you have managed to reach the this page and you have been looking for modules like nodewords for metatags.
Njoy
PS: If this posts helps you in anyway please comment and support :)

Read More...
AddThis Social Bookmark Button