Tag Archives: Drupal

Drupal 7 – Apply different theme based on path

Recently i have created a mobile website using Drupal. I would like to use another theme instead of the mobile theme in certain pages such as the user login page. This can be done by the ThemeKey module.

1. Instead and enable ThemeKey.

2. Go to admin/config/user-interface/themekey.
Continue reading Drupal 7 – Apply different theme based on path

Drupal 7 – Show YouTube video in LightBox2

The following HTML allows you to show a video in LightBox2.

<a href="http://www.youtube.com/embed/<VIDEO ID>?autoplay=1" rel="lightframe">Click me</a>

 

We could control the size of the popup.

<a href="http://www.youtube.com/embed/<VIDEO ID>?autoplay=1" rel="lightframe[|width:320px; height:240px;]">Click me</a>

 

Done =)

Reference:

Drupal 7 – Menu item is disabled after saving the node in different language

i found a bug with the i18n module. Assume i have a node in Traditional Chinese and i edit it in English. The menu item set Menu settings will be disabled after save.

A simple workaround is to alter the node edit form such that the user will be redirected to the language same as the node.
Continue reading Drupal 7 – Menu item is disabled after saving the node in different language

Drupal 7 – Create your own theme function on your custom block

More than a year ago, we have talked about some basic theming in Drupal 6.

In Drupal 7, there are some changes on the theming functions as well as the block hooks. So here is a slightly modified versions from the example of Drupal – Introduction to Drupal Theming @ 3. The logic behind is exactly the same.

ykyuen.info
Continue reading Drupal 7 – Create your own theme function on your custom block