Skip to main content
Contact us on +32 2 306 02 11 or mail us at info@desk02.be

Blog

27Feb

In Drupal there are basically two main ways to do multilingual menus. The first one is using the i18nmenu module from the i18n module.

Menu translation module.

Enabling this module will give you the possibility to either set a language per menu item or to translate the label and description through the "translate interface" functionality.

Language menu item option.

02Feb

Drupal cocktailDesk02 sponsors the Drupal Developer Days taking place this weekend at the VUB. We will be offering a Drupal cocktail on saturday from about 15h00 till our stock runs out.

By the way, we're looking for two junior Drupal developers. If you're looking for a Drupal job in the neighbourhood of Zaventem be sure to stop by and talk to us. It's the opportunity to get to know us and have an informal chat!

23Nov

Desk02's website got a new look (and a new engine), so the old look gets a new function, as the Desk02 Gradiel Drupal theme. And not just a theme, but a theme with color scheme functionality. This allows the administrator of a site to adjust the color-palette via the administrative interface.

Desk02-Gradiel-Color-Schemes-Preview.png

What happens behind the scenes of a color scheme?

You could see it as a automatic image slicer. A chosen background-color is placed entirely or partially behind a semitransparent grayscale image. Slices are cut according to preset coordinates from this resulting image. One region can be set to have a vertical, two color gradient.
The CSS files will be adjusted as well. Here the color of all 'a' tags will be set to the value that is chosen for links. All other text color will be set to the value chosen for text.
The generated images and adjusted CSS files will be save together with any other required files in a temporary folde in the folder 'files'.

29Apr

When Desk02 created their own award-winning CMS MyCMS they had a clear vision on how the multilingual part of websites should work. The language switcher part was briefly discussed in my previous post and today I'd like to discuss the language negotiation part. Drupal offers out-of-the-box three different language negotiation methods. Two try to retrieve the language from the url and a third one uses the domain name. Since we've started using Drupal exclusively the past year-and-a-half we've been using these methods but were not really happy with how they function. Moreover they're tied to default language setting which has its own problems.

Default language negotiation options.

07Apr

The locale module provides a language switcher block. This block, on its own, only prefixes the current link with the appropriate language prefix. Using the language switcher like this only results in seeing the same node with a translated interface. The code producing this block also introduces a new hook called hook_translation_link_alter() which allows other modules to modify the links in the language switcher block.

17Feb

When you have a region that needs to be styled differently depending on the number of blocks that are in that region or you need to know which one is the last it is useful to have a variable available to the block template which hold the number of blocks and the current block in a region.

This information is not available by default. Which positional information is available?

In theme.inc:

function template_preprocess(&$variables, $hook) {
  ...
  $variables['id'] = $count[$hook]++;
  ...
}
 
function template_preprocess_block(&$variables) {
  ...

  • Feweb - Federatie van webontwikkelaars
  • Lid van Drupal Association
  • Sugar CRM