Some time ago, we talked about translating some Drupal site variables such as site name through defining them in the sites/default/settings.php.
Drupal – Site Name Translation Continue reading Drupal – Translate User Registration Email
Tag Archives: Drupal Development
Drupal – Get Path Alias from Node ID/nid
With Pathauto, we could configure the node path alias in a much convenient way. Sometimes, we may want to get those alias in code during Drupal development. The following function will return the path alias from a nid. Continue reading Drupal – Get Path Alias from Node ID/nid
Drupal – Render Node Comment Form
Node Comment allows you to create the content type as comment. Instead of having only comment title and body, Node Comment lets you add CCK fields to comment content type.
Normally, if we want to render the default node comment form, you can use the drupal_get_form() function. Continue reading Drupal – Render Node Comment Form
Drupal – Force Path Prefix for Default Language
Update: 2012-04-18: This solution is for Drupal 6 and it hacked the Drupal core. So please apply it with extreme caution. For Drupal 7, please try the approach suggested by outsourcer.
When you have more than one language on Drupal site, you have to define the default language among one of them. For example, if i set English as the default language, it will be shown in both http://<domain_name>/ and http://<domain_name>/en. but all the links in the default language will not have the en path prefix. Continue reading Drupal – Force Path Prefix for Default Language
Drupal – Get Image/File path by File ID(fid)
You can get the image/file path by fid using the field_flie_load() function. Continue reading Drupal – Get Image/File path by File ID(fid)
Drupal – Enable Quantity Field for Ubercart Add to cart form
Update @ 2015-04-27: There is a simpler way to achieve this without coding. Please refer to this comment.
In the Ubercart product page, the product quantity option in the add to cart form is hidden by default. If you want to allow user modifying the product quantity in the order, create a custom module and implement the following hook. Continue reading Drupal – Enable Quantity Field for Ubercart Add to cart form
Drupal – Create a Drop Down Menu
If you want to create Drop Down Menu without working on the Javascript code, you could consider the Drupal Fusion theme + Drupal Skinr module. Continue reading Drupal – Create a Drop Down Menu
Drupal – Quicktabs Translation
If you could not find the Quick tabs tab name in the Translate Interface. you can add the following function in the template.php. Continue reading Drupal – Quicktabs Translation
Drupal – Panel Pane Title Translation @ 2
Another way to translate the Panel pane title is by the Drupal template system. Create the panels-pane.tpl.php in your theme folder.
panels-pane.tpl.php Continue reading Drupal – Panel Pane Title Translation @ 2
Drupal – Panel Pane Title Translation @ 1
In Panel page, we can configure the pane title at the content page. Continue reading Drupal – Panel Pane Title Translation @ 1