Monday, July 29, 2013

Create a Slideshow in Drupal

Required Contrib Module:



We need a file that contains a JQuery slideshow script. This will need to be uploaded manually.


  • Click the Download the Cycle Plugin link
  • Download the file which will be called jquery.cycle.all.js

  • Browse to /sites/all
  • Create a folder called /libraries/ so that the path is /sites/all/libraries/
  • Create a folder called /jquery.cycle/ so that the path is /sites/all/libraries//jquery.cycle/
  • Upload the jquery.cycle.all.js file into that last folder


We're going to create our slideshow using Views
  • Go to Structure -> Views -> Add new view
  • Check Create a block
  • Choose Slideshow for the Display format
  • Click Continue and Edit




on the next screen
  • Click add next to Fields

  • Search for Image and select it


  • Search for Global: View result counter and select it

  • Click Apply (All displays)
  • Uncheck Create a label for Image

  • Set the Image style to Large(or our custom image style)
  • Check Exclude from display for Global: View result counter

  • In the Format area click settings next to Slideshow

  • Scroll down to the cycle options
  • Check the box Pager under Bottom Widgets
  • Select Global: View result counter as the Pager fields.
  • Click Apply (All displays)


Only Promote contents to appear on Slideshow
  • Click add next to Filter Criteria
  • Search for Promoted to front page and select it
  • Click on Yes under Promoted to front page



Thursday, July 18, 2013

Setting a Multilingual Site in Drupal


Required Contrib Modules:

Modules to be installed
  • Content Translation (core)
  • Locale(Core)
  • Localization Update
  • Block Languages
  • Field Translations
  • Internalization
  • Menu Translation
  • Multilingual Content
  • Multilingual Select
  • String Translation
  • Synchronize Translations
  • Taxonomy Translations
  • Translation Redirect
  • Translations Sets
  • Variable translations
  • Variable
  • Variable admin
  • Variable Realm
  • Variable Store


Now we can see four new options added in Region and Languages

  • Languages
  • Translate Interface
  • Multilingual Settings
  • Translation Sets

For adding a new Language (https://drupal.org/node/21145)

  • Configurations -> Region and Languages -> Languages -> Add Language
  • Choose the language we want and click add language.
  • Now this will import the translation from Drupal Server




Define how to decide which language is used to display page elements (https://drupal.org/node/1497176)

  • Configurations -> Region and Languages -> Languages -> Detection and Selection
  • Enable URL



Where translation files will be stored

  • Configurations -> Region and Languages -> Languages -> Translation Updates
  • In Store downloaded files give the paths as sites/all/translations


Define Translatable text formats
  • Configurations -> Region and Languages -> Multilingual Settings -> Strings
  • Enable all three text formats (Optional)


To hide the translations link from contents
  • Configurations -> Region and Languages -> Multilingual Settings -> Node Options
  • Enable Hide content translation links


Enable translations for Content types
  • Structure -> Content types -> Article ->Edit
  • Under Publishing Options -> Multilingual Support,  choose Enabled, with translation
  • Save it come again to this page
  • Under Multilingual Settings -> Extended language options, enable Require language (Do not allow Language Neutral) only.




After all these steps, we can see a new tab called Translate appears on the top of the contents. we can translate the contents from here.

To switch between the language we need to enable Language switcher block in the blocks area. By using this switcher we can easily switch between the languages.